If the charger is a very basic charger (just a transformer and rectifier), replace the rectifier with a voltage doubler.
If it's actually a little smarter (ie. actually measures battery level and adjusts) then it's more complicated and probably not worth it. There are tonnes of 24V chargers on the market that are designed for scooters. Very cheap.