Have you looked at the condition of, and verified that the cable itself works, as it should?
I would not be thinking about removing the drive gear from the t-case, but rather, verifying that the cable is not broken, and functions properly...
Again-
Has this ever worked? Did it just die today? Did you ever have your stereo turned down enough to realize if the speedo head or cable were possibly making any noise before it stopped working? A little more info may help with this...
1-Remove the negative battery cable.
2-Remove the two screws that hold the instrument cluster in place.
3-After pulling the cluster forward a bit, unhook the speedo cable from the back of the instrument cluster, by squeezing in the little catch, and pulling it off.
4-Unhook the cable from the drive mechanism on the transfer case, and turn the little round piece that is inside, or, see if it falls out, which would indicate the need to replace the speedo cable, if it does turn, and does not fall out, have someone verify that the other end of the cable is turning up in the cabin.
If the cable is functioning as it should, then the focus should turn to either the drive gear in the case, who's operation can be verified by jacking the rear of the truck up, supporting it on jack stands, chocking the front wheels, placing the transmission in neutral, and turning the rear drive shaft by hand and watching to see the little female drive piece inside the area where the speedo cable attaches actually does turn.
If this operation occurs, then I would say that it is a pretty safe bet that the speedo head is not functioning properly, and may need to be repaired, or replaced.
Good luck!
-Steve