You can check the trans and transfer case the same way, like stated have someone shift the levers while someone watches. Also make sure they both are moving through all the ranges of motion and not getting bound up when you try to shift them.
You never said (that I read) if you have manual locking hubs on the front axle or not ? Since it is 4wd, lets rule out the transfer case first. If you have manual locking hubs, lock them, put it in 4wd and put transmission in D. See if truck moves. If it does move have someone watch to see if only the front drive shaft is moving and not the back drive shaft.
If it does move (and only front drive shaft is moving), problem is with transfer case or rear end. If it still does not move then the transmission needs to be looked at before you can move on.
If you do not have locking hubs on the front axle (more than likely a np203 transfer case), you have to check that the transfer case is not in neutral, (by shifting and checking under neath vehicle) if it is your truck should not move when in neutral.