I am having the same problem with the Kohler K582 in my HT23. The engine died in January, but I've only just yesterday gotten the chance to start working on the tractor. In the mean time I've had time to research the possibilities of what may be causing the problem.
Caution: If you hear any unusual (bad) noises, don't crank the engine! You may cause more damage. Turn the engine carefully by hand. Removing the spark plug/s will make that easier. I do not hear any unusual noises when I crank my engine, so I didn't think it would be a problem to do so during my diagnosis.
The point breaker on the Kohler K-series opposed-twin engines are mounted on the governor and are opened and closed by a pin actuated by a cam inside the governor. I had checked for movement of the pin with a dial indicator while cranking the engine and there was no movement at all, even though the pin was not stuck. I removed the pin and there was no sign of wear on either end. There is an inspection port above the governor gear, so I removed the plug and looked in there while cranking the engine and saw that it did not rotate. Since the governor gear is directly intermeshed with the camshaft gear, which in turn is directly intermeshed with the crankshaft gear, there are only a few possibilities as to why the governor is not turning. I proceeded to remove the valve covers and discovered that the valves were not moving either when cranking the engine. This indicates that the camshaft is not turning. I performed a compression check earlier (when the engine first died) and did get readings on both cylinders, so I know that the crankshaft is turning and that the pistons are moving.
Some possible causes:
1. Sheared crankshaft gear key - good possibility
2. Failed crankshaft gear - less likely (steel gear)
3. Crankshaft end (with gear) broken off - unlikely
4. Sheared camshaft gear key - unlikely (if gear is plastic)
5.Failed camshaft gear - best possibility (camshaft gears in later Kohler K-series engines are made of plastic and have been known to fail, early engines had steel gears. My engine had been replaced with a new one in 2000, so is therefore a later engine.)
6. Broken camshaft - unlikely
I have not disassembled my engine yet, but I pray that it is a failed plastic cam gear or a sheared key and not something more serious. I have already acquired a used steel cam gear to replace the plastic one. No matter what, in either case, I intend to replace the plastic gear with the steel one.
I'll let you know how I make out (hopefully soon).
Check out all the things that I have.