I have a 2003 yukon with this problem occurring intermittently. The first and most simple way to get it out was turning it off, then back on, then go into neutral and HOLD the 2wd button for 10 seconds, even if it seems like nothing is changing, hold it down. If nothing after 10 sec changed the only other thing that worked for me was popp8ng the dash cover/ face off off, removing the 4wd switch. Unplug the harnesses from the switch and plugging them back in.
I've had this problem for a while and almost always holding the 2wd button has worked, even when it seemed like it wasn't doing anything. After 10 seconds it would "klunk" out if 4 Lo. I learned that from a random comment on a forum somewhere.
Hopefully this helps. I just had this issue a few days ago and tried multiple things. Pulled fuses, disconnected battery, but the only thing that worked was removing the switch, pushing the wires into the connectors (just in case) and putting it back together. Once I turned the car back on I was able to go back into 2wd.
Usually I dont lose the lights on the switch, but I did the last time it got stuck. If I have lights, normally holding the 2wd button worked.