Hello and welcome to JustAnswer!
If the speedometer doesn't work with a new sensor then you either have a wiring problem to the sensor, a connection problem at the sensor, or an internal TCM problem. The TCM is internal in the powertrain control module (PCM). Your first step is to see if the TCM is awake and what fault codes are stored like I had explained. This will tell you where to go with diagnosis. If there is a speed sensor code then you either have a bad sensor or a wiring problem. If the TCM isn't awake then it's powers and grounds will need to be checked, and if all is ok the PCM will need to be replaced.
So then its probably a wiring problem