speedo is electronic so you'll need to check connections, especially round by the speed sensor where the wiring is subject to water and road dirt,
speed sensor is on the back of the transfer box by the handbrake drum
check the speed sensor with a multimeter to see if its working