There are a bunch of questions you need to be able to answer before you do something.
Why do you want the players to move slowly?
Primarily because there are things that develop in various places that occur while they travel. For example: having major developments happen between the government and the thieves guilds happen in the 4 months they were gone is realistic, in the 2 days they were gone not so much.
Depending on the answer here, it may not even be an issue.
If it's because they're skipping all your well-designed encounters, there are a few ways to rectify things:
Design encounters for the route they take (this is primarily what has been suggested here).
Actually, I don't mind the fact that they basically "equipped the party ability 'No Encounters'" to bypass the random encounters and get to the story-line encounters.
But using the Warp Zone method does have the chance of making them miss stuff, but that's the catch-22 of what they're doing, and I'm not that concerned with it, it's mostly the time thing above.
Alternatively, you could just let them get to the town, complete the quest within 5 minutes, then tell them that you don't have any more prepared for today and bust out a board game.
If you wanted to not be a dick about it, you could take a moment and tell them that you've set the interesting encounters and adventures below ground. If they actually want to play the game, they should go after them down there.
Part the fist would kind of peter out the fun of it all, IMO. Part the second would be enforcement via metagaming, which is bad, plus one of them postulated that as they were discussing this, and was an insufficient deterrent.
If you want the players to move slowly because it gives you leeway to create more interesting and dangerous encounters, then you need to talk to your players and explain how teleportation and flight are making it difficult to design fun encounters for the game. Again, if you aren't playing with dicks, you can ask that they approach the game on a manageable level for you.
If they are dicks, then you might not need to be playing with them.
To be blunt, the last part there is a continuing thought. Not because they're dicks, but because their play-styles are so very different that it is really hard to make a campaign for all of them. One wants a Greater Epic Campaign, and is a dick about anything that limits him. One needs help every time there is a ranged attack roll, and wants a Rollplaying Campagin. One wants a Comedic / Satire Campaign. And-so-on.
Campaign Types, for reference.If you're able (and willing) to design fun encounters for the way they're approaching the game, and it's still frustrating you that they're hopping over your obstacles, be careful. You might be power-tripping.
The fact that they are hopping over obstacles is only a secondary concern, as above. Most truly relevant obstacles would be "mission objectives" anyway, which is why I ignored the "put the goals where you want them to go" comments above.
Another thing to look at is why the players are trying to go that particular way.
If it's because they're concerned about how difficult the challenges might be underground, then feel free to use some of the suggestions here, and warn them (as you already have) that the challenges in space are not going to be any easier.
If they're trying to complete their quest most efficiently, then you can help your case by giving them a minimal amount of reward, and tossing a few, simple, go-here-kill-this quests their way to reinforce that combat is the primary source of XP and loot.
They might be looking for payouts other than leveling up and winning combat. If so, then you need to be careful with the group. D&D is a game where killing monsters and taking their stuff. If killing monster and taking their stuff isn't what they want to be doing, you may need to transition to a game that does what they want to do.
If they trust you to make the game fun for them, regardless of what they do, fantastic! You're already doing very well. Use the tips here to make your new battlegrounds and encounters and live up to their expectations.
All of this.
i'm a big fan of the "rule of yes" and "rule of consequences". i let the players go where they want. sometimes they run into nasty stuff they have to run from. sometimes they die. usually they wise up before all of them die.
i agree more with the suggestions for adapting the encounters for the route they are taking than forcing the pcs into a specific place.
however, i also think that if you want them underground, then their either the goals or the keys to the goals need to be underground. they can wander around and not be able to find what they need all they want.
then again, if they ignore it, let them. time passes. the world changes. the villain wins, perhaps because they were not there to stop them. that becomes the new campaign arc. the world does not stop because they are there, nor does it stop because they are not there. let the pc's choices play out to the natural consequences. for better or worse.
i wouldn't punish them for figuring out how to get around the mountains. but then i wouldn't make it easy either. i don't set out to kill off my pcs. but if they wander into something too powerful, and they insist on continuing despite in game hints, then i let them.
after all... no campaign survives first contact with pcs. just keep on swimming. ^^
This group, or more specifically the problem child, loves to argue "the rule of consequence". He went off on his own in an area wherein they knew that there was bad stuff around, and got killed by Callers in Darkness, which hold onto your soul, and blamed me for it, despite having warned him.
Now he's trying to get the party TPK'd, was warned, is doing it anyway, and has already set up his "if we die because of doing something we were told was stupid, it's your fault".
Yet, if you can't tell, the suggestions I am paying most attention to are the ones that are helping me make the "encounters table" as it were. I am trying to be fair, and trying to maintain verisimilitude, I am not telling them "no", nor trying to find a DM-fiat method of telling them "no", such as there being no use to their magic items in space.