If your front axle is spinning without the drive shaft, you have a hub locked. Jack up the front axle and spin each tire individually. Whichever one makes the pinion spin is locked. Either you have the lockout turned to lock or it's stuck in that position.
There is no module on top of the transfer case. If you have a manual shift, there is one sensor. If you have a electronic transfer case there is a motor and a position sensor bolted to the side of the transfer case. Did your mechanic pull any codes indicating a transfer case issue or is it just not working? You can check if it's stuck in 4x4 by crawling underneath and spinning the front flange. If you put it in 4x4 it won't spin, 2x4 will spin.