First thing I would do is get a Tach on it and run it where it is surging. Grab the linkage with your hand and hold it at a steady RPM where it normally surges. If the surging stops and it runs fine, the problem is in the governor. If the engine dies or wont run steady while holding the throttle you have a fuel problem.
Also I would check to see if you have any Fault Codes. There are only a few possible but if there are any...fixing those first would probably be a good idea.
As for engine speed sensor...I believe that engine grabs a signal off one or both of the ignition coils to calculate engine speed.
Kawasaki fuel injection shares very little with automotive fuel injection(at least modern automotive). Now Kohler on the other hand is a lot more automotive.
I honestly know very little on the Kawasaki DFI. We are not a Scag dealer and they are probably the biggest user of that FD791D. It gets talked about a fair amount at update meetings...but hopefully a solid Scag guy can chime in and maybe help you a bit more.