Use a new boss with the same exact stats that you have already prepared.
The enemies should be adaptable too. They heard about what the players did and now the new boss can prepare for that situation.
The vampire lord, that got killed too early, has an evil step sister who now wants revenge for her brothers death. Use the same final battle you had planned with a different character. A different character that has a special defense against what the players did to win last time.
The story isn't over. In the star wars books, the emperor cloned himself. Final battles for days!
There will always be one more power orb to destroy, one more magic weapon to find. One more town to save.
The story isn't over.
The players might have killed your robber baron but they still have to find the deed to the ranch. The Players still need to clear out the dungeon of kobold minions and evil cultists who were working for the dead boss.
Don't give up and don't let the players stop your game. There is always something else that needs to get done.
Protect your villain during battle.
Fudge the dice! Change your stats mid-battle! This is one of the best powers a DM has at her disposal.
If you have 5 players attacking one bad guy, that's 5 attacks versus the bad guys 1 turn. So the enemy needs a lot of extra HP or other bad guys that the players can target their attacks.
If you see the players are doing too much damage to your big bad, ending your epic fight too early, give your big bad 100 extra HP. An intelligent enemy will always try to heal themselves. Give your big bad as any healing potions as he needs.
Give your bad guys special resistances or a powerful magical shield that the players can't penetrate until you decide when the baddie gets hurt.
Give the big bad an extra spell every turn. Matt Coville calls them Villainous actions. ledgendary actions are neccecary whenever the party gets too strong.
Let your big bad get in an extra attack or special spell to control the flow of battle. Let your boss go into a rage that lets him deal out and extra dice of damage. Have a second or third wave of minions come in to help the boss out.
The players can't take down your big bad right away if they have to deal with his bodyguards first. Let the big bad run away. Let your villain use a teleport or fly spell to escape a loosing battle.
Have goals set up that aren't just about killing things.
Make sure the players have a goal that is more complicated then just killing the bad guys.
They need to turn off the doomsday machine before time runs out. Dispel or de-power the magic orb the enemy was using to open portals.
If you have goals already set up, you can put in as many obstacles in the way as you want. This way when the boss does die too early, your story can continue and the players still have things to do.
If you need more time to prepare, send some skeletons or robots after the party. The players won't be able to talk or charm their way out of battle with mindless creatures.
During the battle you can have some time to think up whats next.
It's okay to take a 10-15 minute break mid-game to think up something new.