Caveat Emptor
Forcing the PCs to part with their loot always is iffy - unless the game you play has a specific mechanic for blowing your money (like Conan: Adventures in an age undreamed of), getting players to part with their items is always tricky.
But there's two ways out of your situation:
ConfessingTable Solution: Confessing you messed up
Talk to your players. Tell them that you messed up by having the NPC run and that they were not supposed to have that much money now. Ask them if they are ok to retcon the bounty down by the amount of the debt that the ship secured.
This works great if you know your players, and I used it a couple of times.
TheIC solution: No payment to the debtor means the debt doesn't go away.
The NPC is gone, but the boat still is one of his possessions and secured the debt. The town thus repossesses the boat as originally planned to cover the debt. Do note, that a sailing ship is worth at least 5 digits!
To get off the island, the PCs would need to buy the boat and hire a crew, which costs or pay for passage. This will cost them a lot of money. Sure, and with the price of ships, the 1800 gp they willhave now ownis not enough to pay for the boat in full. As the town has the only operator of a ship, they can dictate prices for passage.
If the party decides to try and buy the boat, butnote that they can't lug that to dungeneering, and they can only sell it for a fraction (half or less) of its worth in a different place - or they. Also, they'd need to pay to keep the crew wages to keep it running if they don't want to keepsell it.