The vacuum switches sides when you hit the lever. It goes from one side to the other causing the shift fork to slide over. There are two styles of lights though. One style is on the CAD, and actually unscrews from it. You will see two wires if that is what you have, with a sensor that looks just like a reverse light sensor on a transmission. If your CAD is stuck it could make the light stick on. The other style from earlier YJs is on the firewall. I have not worked on those. I believe it is after 92 they were on the CAD itself. My CAD failed, and for less cash then a posi cable I swapped in a solid axle. Then you can put a sensor from a Cherokee on your TC for the light to keep working when you shift in and out of 4X4.
Complete rebuild axle/engine/everything swap in progress:
Parts already gathered for assembly: 2001 Ford 302, 1990 Mustang GT 5.0 ECU and wiring, NP435, NP205, Pair of axles from 04' F350 SuperDuty (Sterling 10.5 Posi rear, Dana 60HP Front-Both Disk Brakes 3.73 Gears), 37" H1 Tires, 9" lift TJ Coils for 2 link conversion in front, Stage 2 Clutch Kit, 3 Row Aluminum Radiator, Chevy Astro Steering box (4" front Stretch), XJ Rear Leaf Springs (6" Rear Stretch), and lots more.