We have a 2005 Xterra that the transfer case went out on. Replaced it with a used unit, and it wouldn't shift into 4wd due to low voltage at the shift motor. Replaced the motor and the electronics and it still has low voltage. We are assuming the issue has been there and that the unit probably didn't shift out of 4wd at some point and caused the transfer case failure. Even Nissan Dealer couldn't find a solution.
The only thing you can do is trace the wiring back to see where the power is lost. Actually, start at the switch to see if it is bad. I have seen weak switches that can no longer handle the voltage and break down when put under a load.