Your seafaring party lost their ship? The solution is a quest, not a free ship.
You stated in a comment:
I made the spell in case my players lost their ship in a campaign.
From a narrative perspective, losing a ship is entirely meaningless if they can bring it back in a couple hours. As the DM, it's largely up to you if their ship gets destroyed. If you want them to have their ship two hours from now, don't destroy it right now. If you want to prepare for the possibility of them losing their ship, prepare a quest or adventure arc that culminates with a new ship, rather than preparing an ctrl+z button that makes such a devastating event totally meaningless.