Hi!
My Microsoft Lumia 950 did the same thing and replacing the battery did not fix it for me. However, I did not give up and after opening it up I noticed that a fuse blew off the board, so I had to get that replaced. You can follow [guide|27077|this guide] on how to get to the charging daughterboard in your phone if you wish to replace it yourself.
Otherwise have a technician fix it for you.