A 2012 Wrangler doesn't require a key for towing. The ESC OFF lamp doesn't disconnect your driveshaft... EVER!! It is a warning lamp to indicate that the electronic stability control is turned off. It comes on when you shift into 4 wheel drive.
The transfer case selector is the one I'm sure you are saying you are having trouble with. As you say, it needs to be in neutral, and may also cause the ESC Off lamp to come on if the key is in the run position.
Here is info directly from the 2013 owners manual which is effectively identical to the 2012...
1. Bring the vehicle to a complete stop.
2. Turn OFF the engine. Brian's note - notice you don't shift out of gear before turning off engine,
3. Press and hold the brake pedal.
4. Shift the automatic transmission into NEUTRAL or
depress the clutch pedal on a manual transmission.
5. Shift the transfer case lever into NEUTRAL (N).
6. Start the engine.
7. Shift the transmission into REVERSE.
8. Release the brake pedal (and clutch pedal on manual
transmissions) for five seconds and ensure that there is
no vehicle movement.
9. Repeat Steps 7 and 8 with automatic transmission in
DRIVE or manual transmission in first gear.
10. Turn OFF the engine.
11. Firmly apply the parking brake.
12. Shift the transmission into PARK or place manual
transmission in gear (NOT in Neutral).
CAUTION!
Damage to the transmission may occur if the transmission
is shifted into PARK with the transfer case in
NEUTRAL (N) and the engine running. With the
transfer case in NEUTRAL (N) ensure that the engine
is OFF before shifting the transmission into PARK.
13. Attach the vehicle to the tow vehicle using a suitable
tow bar.
14. Release the parking brake
If it won't work the way the manual states, head on down to the dealer for warranty service.