OK, so you have threading working in principle. Good.
Now to get the pitch right. This can be done.
I will assume you have have checked the calibration on your Z axis, so we will ignore that.
In that case, your chuck RPM is WRONG. It just has to be.
Possibility:
First of all, I am guessing that the index pluses are coming from the motor, not the chuck. If this is correct, and the pulley ratio is not 1:1, then the pulley ration in Mach could be actually the reverse of what it should be. Any joy here?
If the index pulses are coming from the chuck itself ... blimey. I dunno!
Cheers
Roger