You didn't mention the type of battery, whether lead-acid, or lithium. If the latter, there are several types. On is about 38V at full charge, while the more common types would be 42V at full charge. Your charger might have its full charge voltage printed on the label.
For sure, if it's a lithium battery built with the 18650 cells, that should be 42V at full charge, Your numbers indicate a weak battery.
Any replacement will work, but getting one that fits the current mount iis the first pronlm.