RObert, yes, the tranny uses the vehicle speed to look up a graph to see what gear it needs to be in based on engine loading, RPMs, and speed. You don't have the speed and the truck gets a little confused.
As for your issue, it can be a number of things. You can try pulling out the VSS Gear and seeing what that looks like. Crawl under the truck on the driver's side and find the tail shaft piece on the transfer case for the rear drive shaft. You will see a little piece sticking out the side of the tailshaft with a 2 wire plug on it. That is your VSS speed sensor. You can pull it out, look at the gear to make sure the teeth look good and then you can have the truck on and give it a spin and see if the speedo moves. After that, I would be betting you have a wire issue between the VSS sensor and the computer.