Check with a clutch/flywheel resurface shop ,local or online search they may be able to hook you up. Spec out your old one and search starter ring gears. You could try a engine re-builder shop also. You should be able to replace just the ring gear not the whole flywheel. I Google searched Kubota starter ring gears and found
About 2,280,000 results (0.45 seconds) matches many on ebay and amazon prices $140.00 and less. Some engines like to stop in the same place and you will end up with a bad spot on the ring gear. You could take it off the flywheel and reclock it say 120 degrees. Some more work to remove the eng if this does not work but less parts costs. I do not think you could test it with the eng out of the machine since the pump would not be hooked up and the eng would probably not stop in the same place if it was hooked up. But you could try it. What eng is in the machine? I quest it is a Kubota but sure on the model and size.