If you want a simpler way or are on a Mac, use these steps.
- First open the world and type /seed into the chat.
- Write down the number for future use.
- Place all of your inventory items in chests. If you don't, you won't get them back.
- Make sure to exit the world before the next steps!
- Open your Minecraft folder and browse to your saves folder.
- Take out the world you want to change and store it somewhere (eg. desktop.)
- Open it up and find the files called level.dat and level.dat_mcr.
- Drag those files to the trash.
- Now open up Minecraft and create a new world.
- Name it what your old world was named, unless you want to change the name.
- Change the game type to whatever you want the new game type to be.
- Click more options and type in the seed you wrote down earlier in the seed section.
- In more options you can also turn cheats on or off.
Once you have finished customizing, click done. When the world generates, quit to the title screen and do the following;
- Find the world you just created and copy the level.dat and level.dat_mcr to the world file you stored earlier.
- Once that is done, delete the world you just created and drag the world from wherever you stored it (possibly desktop) and put it in saves.
You will spawn at the spawn point, but never fear, simply walk to your house and retrieve your stuff from the chest. You will now have all the options you set on the world you created earlier on the new world.