My battery died, I put the key in to try and start it then the key was stuck.
I’d have it towed to a shop for repair, if it were me.
There is a safety feature in the key lock mechanism that prevents the ignition key cylinder from being turned to the lock position when the vehicle transmission is not in the PARK position. If vehicle power is lost (battery dead), and/or the transmission is not in the PARK position, the operator will not be able to turn the ignition key to the lock position and will not be able to remove the ignition key from the column. If the battery is jumped or charged to restore power, the lock should work properly again.