I have replaced my car's battery and now suddenly the central locking is not working
did you replace with the same kind of battery? MB are very sensitive to it.
i.e. yours use 60-67Ah, 530-570Amps, the best you can do is to search online and compare the battery you bought with the recommended for your car, if it doesn't fits go to your seller and claim for an exchange or refund.
a battery that doesn't fits in requirements to MB could ends on a lot of errors as ESP, ABS, etc.
You should syncronize the key fob. ML is tricky to synch the key. Most other models don't require this but MLs do. I think the instructions are in the owners manual.
Instructions on how to sync Mercedes remote: