Two things I would check. If you have the 4wd selector switch on the dash pull it and make sure the power is making it through the switch correctly or incorrectly. Second check the shift motor on the transfer case to see if it is not working correctly and maybe switching. Sorry I don't hae a wiring diagram but these would be some easy things to check