Wonder why (1) has (4) wires?
...most only have (2) wires
Did ya try-n Google the make & model of your (4) wire charger?
...to gather any info you can
Are both chargers 24VDC?
…& for the same type batteries?
...lead, SLA etc. (NOT lithium?)
If they're the same, I would proceed with some testing

(by simply checking the output plug with a multi meter)
...if not, I'd give it up.
Hopefully, you have a receptacle to connect to the chargers DC output plug.
* If not be very careful because them pins are kinda small & really close together & if you accidentally touch (2) pins together at the same time, with the MM probe, it would cause a "direct short" & probably "pop" the charger.
Moving on

Carefully, touch (1) probe (red) to (1) pin & the other probe (black) to another pin, while also watching the meter.
If you don't get a reading, try another pair of pins.
Their should be at least (1) pin that, when contacted to the red probe, shows positive (+) ~27VDC when/while the black probe is contacted to another pin.
This should indicate the positive (+) & the negative (-) pins of the chargers DC output plug.
…& these are the (2) that should be connected to the battery pack, to charge the battery.
