Assume this is a floor-shift? There is a sensor on the shifter, when you go into park it activates a solenoid in the steering column that allows you to turn the key back to " off" & remove the key.
Since your battery is dead, you may solve your problem by putting a charger on the battery for a little while. Give the vehicle a little juice to activate that solenoid when you're in park.
If a charge doesn't do the trick, then there should be a small hole in the bottom of your steering column, right beneath the ignition switch. This hole probably has a snap-in cover over it that is easy to remove. Inset something small enough for the hole up into the column. You'll be able to depress the rod of the solenoid, and that will allow you to turn the key to " off" & remove it.