One thing to keep in mind is that the speedometer gear housing moves around like a cam, in that as you rotate the housing it moves the speedometer gear either closer to or further away from the pinion gear underneath. That's why it has different rotational positions marked on the tcase housing depending on the speedometer gear's tooth count.
So if the speedometer doesn't work after installing a new gear, you likely don't have its housing rotated far enough so the new gear can engage the pinion gear. Rotate the housing a tad more. I've had to do that both times I replaced the speedometer gear.