I exited Minecraft while in the Twilight Forest and when the world loads, it crashes. I've been looking through level.dat but to no avail. How would I change the dimension of my player to the overworld?
The player information (including location and dimension) is stored in the Player.dat file.
It's named by the GUID which you can get from the logs when you log in (if on a server) or it's the only file in the saves/World name/playerdata folder in singleplayer.
The relevant NBT tag is the Dimension one.