The front shaft is turned by a chain when you engage 4wd, if it's not
turning, you have a broken chain OR the shifter fork is loose and not
engaging the shifter dog to turn the chain, either way the T-case has
to come out.
Test: put the truck into 2wd, go under and turn the shaft by hand with
the hubs in "lock" position, if it turns it's your hubs (could be hard to turn),
if it does not turn then change hubs to "unlocked" shift to 4wd, go back under and
turn by hand, if it now turns you have a confirmed broken chain or bad engagement mechanism,
and the T-case needs to be removed to repair it
Wild