Jack up the front right tire. Put in Neutral. Put transfer case in 2wd. Start the engine. You should be able to spin the front tire and front driveshaft will not spin. Put in 4wd and repeat. Either it won't spin or it will spin and the front drive shaft will spin I don't remember but it will obviously be different if it is working.
If that doesn't work, then unplug the vacuum lines and switch the 4wd back and forth and feel for vacuum switching back and forth in the lines. If you don't, either the lines or the switch on the transfer case is bad.
If that doesn't work, then get some hose and hook straight to manifold vacuum and try switching it back and forth between the two ports on the vacuum motor and see if you can get it to lock and unlock. Or you could use a vacuum pump if you got a good one of those. If that doesn't work, the vacuum motor is bad or the fork is messed up somehow. Take the vacuum motor off and look at it and test it with the vacuum hose.