I dont know how old your generator is, but since you state a transformer, i assume its around 2008 era generator. i would need a serial number to cross reference it truly.
the older units have a transformer within the generator control panel area, and a relay. the relay swaps between utility supplying power to transformer and the generator windings while running powering the transformer. theres also a battery charge module.
View attachment 670640
transformer should show 16 volts aprox at both sets of upper terminals. theres 2 set of 16 volt AC output on the transformer. since your getting voltage at transformer, i bet your issue is with the battery charger itself. ive had to replace quite a few of these over the years. you need the serial number of the generator to verify proper part.
It's very possible that the charger is bad. You can test for AC voltage on the input wires at the top of the charger (the smaller 2 wire connector) and should read around 19 VAC. The output is measured in DC voltage and will be the larger 3 wire connector that only has two wires (no wire in the middle spot). Output should be around 13.5 VDC on those 2 wires. If you have AC input and no DC output, the charger is bad. but, before you do this test you should start generator a few times to draw down on the battery reserve. if the battery is fully charged, i sometimes see no voltage at these terminals. best to be sure battery isnt fully charges. the battery charge module is a 2.5 amp trickle charger.