thereThere are a number of ways to force your characters to follow a certain path you've laid out for them that don't imo constitute railroading. i I don't have a copy of your map or any inkling of your world beyond the dnd-5e, but you could easily re-route players by presenting obstacles that require their attention be redirected to the primary task.
forFor instance, maybe the oceans have rotten because of the border rift polluting the world, or there are monsters in the ocean, or the party can't find a vessel willing to take them closer to the rift via the ocean, or there aren't any viable ports nearby, or the ones that are are currently under siege, or... the list goes on.
theThe point of it for me is that the world absolutely should be, as you put it, traverse-able. at At the same time, you don't have to make that access easy or simple.
iI like nijineko'sNijineko's answer in regards to trying to find ways to take player agency and turn it into an interesting plot event. also Also the point about making sure to have some notes for contingencies, since the one constant in rpgsRPGs is that the pcsPCs will never do everything just as planned. depending Depending on what it is that iI wanted the pcsPCs to do and what they actually did, it's sometimes even easier and better than the original plan, and the co-operative aspect of the story becomes even more poignant when the gmGM doesn't know what's happening next. sometimes Sometimes the best stuff happens spontaneously and off the cuff when you're tripping over yourself to catch up.
youYou also have to be careful how you world-build, since issues like this can crop up specifically because of over-preparation. that That is, you put an ocean in a position where it could be used as a shortcut to the destination, but didn't anticipate the pcsPCs taking that route.
toTo me, it feels like your players are just trying to make the smart/fast/safe choice. while While it should be commended in some respects, it makes the game less fun overall if there are no challenges to overcome. since Since you don't seem to want to (and rightly so) stymie the will of the pcsPCs and railroad them, you can have an oocOOC discussion about what you were thinking in regards to their recommended path, or you can take the time between now and next session to prepare for a grand voyage.
toTo summarize:
- prepPrep for land-based game
- playersPlayers want to travel by ocean
- notNot prepped for players travelling by ocean
i'dI'd say prep for ocean adventures if it's not too jarring for your land-prep, and if it is, then force them to stay on land, or make their ocean journey end prematurely for some reason (shipwreck, impassable storms, monsters, etc.)
becauseBecause honestly, in the end, if you actually do try to keep them from travelling by ocean using in-game mechanics and they still do it, that's going to be an epic adventure story in and of itself.
finalFinal point: you said you're a new gmGM - hats off to you and good luck! it's It's tough but rewarding.