That is The Last Dragonlord by Joanne Bertin. Published in 1998 with the sequel in 1999, the trilogy wasn't completed until 2012. Like you, though, I feel it was clearly stated to be 3 books.
Dragonlord Linden Rathan, last-born of a race of immortal weredragons, has spent six hundred years alone, searching for his soultwin while his fellow Dragonlords ...
This looks like it may be Privateer by Margaret Weis and Robert Krammes. A Google book search shows a "General Dennis," a "Captain Jeantrou" and a "Lord Captain William Hastind."
The cover shows dragons and a flying sailing ship with cannon.
The Google books description mentions a "dangerous mission to the dark world of the Bottom Dwellers."
This is the Pelmen the Powershaper trilogy by Robert Don Hughes.
The two-headed dragon is in the first book, The Prophet of Lamath, and the sentient castle is in the second, The Wizard in Waiting. The third book is called The Power and the Prophet. Original covers by Darrel K. Sweet