We see this often.
Typically what happens is usually the encoder motor that shifts gears inside the transfer case is faulty. But this is just what I've seen in the past.
A few susgestions would be to get all four wheels off the ground and support on jack stands. Shift the transfer case and see if all four wheels spin.
Unplug the electrical connector to the transfer case shift motor and look for any corroded terminals in the connector.
If your mechanically inclined. You could remove the transfer case shift motor and move the shift fork on the transfer case to see if the issue is the transfer case itself. Do this with the wheels off the ground because you may need to move the wheels/drive line to allow the shift fork to move.
Try these test/checks and get back to me or if you have any more questions feel free to reply
Thursday, January 2nd, 2020 AT 9:00 PM