Firstly
Get a JD technical manual for your mower
Cost is less than 1 hours of a techs labour charge.
Written in plain English complete with descriptions so you know what each part is, what it does & how it works
Next the engine will have al alternator fittied and that will be connected to a regulator
Look for wires coming out from under the flywheel
two will be the same colour, these are the AC feed to the regulator, follow them to the regulator .
The regulator will have a 3 pin plug, Kawasaki do things a little different as the 2 AC INPUTS are together & the DC output is on one side
The 4th connection, DC Ground is via the body of the rectifier .
Measure between the two AC wires, engine running full speed, should be 28 V AC or better
Measure between the DC wire & ground connection should be 13 V DC or better
IS your mower just a plain 170 ? ( 100 series ) or are there letters to go with it.