Okay, here goes, This is how my early 99 works.
quickest check is to lock in 4x4 then reach in behind the tire and see if both axles locked in by trying to turn them by hand, if one turns free then the problem is on that side.
The hubs lock/unlock when you flip the switch because a regulator/solenoid on the passenger fender sends a pulse of vacuum that lasts about 30 seconds when you change the dash switch position. One way it sends 6” the other way it sends 15”. These pressures have to be right for the diaphragm in the locks to latch in the correct position.
You can easily test the system with a hand held vacuum pump/tester, they cost about $20 or you can borrow one from most auto parts stores. At the hub you can remove the vacuum line and hook the pump to the hub, you should be able to pump 15” by hand, it may leak some but if it leaks so bad you can’t get 15” then you hub is leaking which is usally caused by the big ID/OD seal in the back of the hub. You can also hook the tester to the vacumm line at the hub and actuate the dash switch to make sure the regulator/solenoid is sending the right pressures but remember you only have a few seconds so it may take two people. If everything checks good then it can be a bad hub lock. I took my locks apart and cleaned/lubed them, I also had a bent catch in it I tweaked back straight.