I'm looking for a book series with a time-traveling story about an evil king who eventually turns into a dragon that turns into a boat that goes back in time to be the dark ship that the heroes used whilst fighting the king.
Sounds like Midshipwizard Halcyon Blithe by James M. Ward (2005).
From reviews on Goodreads:
Midshipwizard Halcyon Blithe is a naval fantasy novel by James Ward that follows the eponymous character as he joins the crew of a dragonship during a war against a shapeshifter nation.
And more to the point:
Let me be perfectly honest here: I love books about ships. I love books about dragons.
This book has dragonships.
A series about dragons, dragonships, an evil king, and time travel taken together seem to fit the The Age of Dragons series by James A. Owen. (Also known as The Chronicles of the Imaginarium Geographica.)
The first book, Here, There Be Dragons begins in WWI England, where a dragon-prowed ship called the Indigo Dragon picks up three young men to transport them to the mysterious Archipelago. There are dragons, and the evil Winter King who wishes to turn everybody into shadow minions.
Time travel shows up in the second book, The Search for the Red Dragon when the Keep of Time, attacked by the Winter King, is damaged enough to start creating rips in time. There are more dragons, more dragonships...
I haven't been able to confirm that the evil king turns into a ship, but the rest seems to match. (There appear to be six more books in the series though.)