My speedo did the same thing.
Assuming you have an M900 series truck, Memphis Equipment has them.
If memory serves me right, it was just under $100 shipped.
That is, by FAR, the longest speedo cable on the planet. LOL
I haven't installed mine yet......definitely not a quick job.