Any DM who has to worry about 'players skipping to 'the end'' either has had that one in a million where something they totally didn't anticipate at all thought couldn't happen event has happened, or they're a DM who can't deal with players not doing what they expected them to do, i.e. a railroading DM.
Anyone running a game worth any amount of salt has insert-anywhere encounters, backup plans for their backup plans, interesting npc archetypes not limited to Sir So-and-So but who can ALSO be Lord So-and-So or Lady Sa-and-Sa with a minor tweak. If the party CAN 'skip to the end', you'd better be bloody ready for it, or able to ad-lib it. If the party uses bardic knowledge and lore to link 50 minor details you accidentally gave away in various box text, and somehow unmasks everything way early, leaving you entirely off-kilter, then you ask for 15 minutes, furiously re-write, and then keep playing. I've done this. It's really not impossible. People talk about that kind of stuff for YEARS afterwards, it's far more memorable when they actually did detective work and it worked (and for some reason my on the fly plots tend to get overwhelmingly positive feedback - desperation is the mother of creativity, I guess) as opposed to slowly figuring it out over time and clues like most games/plots.
Honestly, if you're the DM, and you're improvising, and people can tell the difference between you improvising and you having prepared notes etc? You're not very good at improvising. Downright terrible, in fact. This whole 'from everyone i've talked to, improvising = bad' thing Innabinder is saying sounds like flawed data - to wit, data from the tables where the GM was bad at improvising and people noticed, and they also thought it was bad because the GM was bad at improvising, i.e. the same reason they noticed it at all in the first place.
Unlike the vast majority of players, when I help the GM clean up or catch public transport with them after the game or whatever, I like to discuss the plot that's happened so far and how they came up with it and how much they're adlibbing and whether I liked X monster or X fight. The only times i've ever noticed anyone else picking up on GM improvising has been when the GM has been terrifically bad at it, umming, ahhing, checking notes that he's already lost/aren't there, making up stupid sounding things, throwing in a fight clearly so it's something to fill time, ending sessions early, all that stuff. Typically these have been very rote GMs as well, relying heavily on prepared notes and speeches. There are some GMs who rely heavily on prepared descriptive text etc who can also improv well, but so far the ones that i've noticed who improv particularly badly are the ones who rely heavily on prepared descriptions and notes, which makes a lot of sense really.
essentially, if you need prep for everything, don't prep a specific timeline, because either you'll get into a fluster every time the PCs deviate, or you'll try to make the PCs stay on the straight and narrow (railroad). Prep encounters, fights, NPCs etc that can be used in lots of situations and different reveals for important plot points found out in different ways, etc etc.
Oh, and for all the people saying 'just kill the PCs and then go 'hah hah you didn't grind hard enough' that's.. amazingly terrible GMing. I'm so very glad I have never played in a game you guys have run, and if I have, I probably walked out.