Our speedo input is provided by a solid-state "Vehicle Speed Sensor" located on the rear of the transfer case (passenger side, lower electrical plug near the drive shaft).
You might try just unplugging it's connector from the transfer case, cleaning all the contacts, applying some dielectric grease, then plugging it back in. Maybe it just got wet or a little rusty and you're experiencing signal loss.