Although it's a little redundant with a battery-swap, try doing a SMC reset.
[
osxdaily.com]
Watch to see that the power-light changes to green and then orange after the SMC reset. This indicates normal operation and charging.
If it still fails to charge the Mac, try yet another power adapter. Because you will almost certainly want to try all of the basic stuff even if redundant when facing the next most likely thing:
The failing DC-in board.
(Not the hardest part to source, and not all that expensive, but a PITA to replace.)
If I recall correctly, that Mac doesn't have a built-in hardware diagnostic. You can try booting with the "d" key held down anyway to see if it'll boot into the hardware-test, but I think it'll throw an EFI error. If you can get into the hardware-test, it should report an error if it's the DC-in board at fault. You might also seek out an indie (but certified) Mac consultant in your area and ask them if they can run ye olde Apple Service Diagnostic on your Mac.