Can you take a picture of the charger port? Otherwise check the charger port for any dust blockage inside. Does the charger cable go in firmly? If there is lint and etc stuck in the charger port you can use a toothpick to get some of it out.
If that still doesn't work or the charger port looks fine, try using another battery.
+
+
Edit: If you get a stuck on Samsung white text logo boot loop try another battery first. Otherwise the next thing to try is updating the phone via Odin Samsung Firmware flash via computer then factory reset / wipe data in recovery as last resort (Has to be after you flash firmware update first).
Can you take a picture of the charger port? Otherwise check the charger port for any dust blockage inside. Does the charger cable go in firmly? If there is lint and etc stuck in the charger port you can use a toothpick to get some of it out.
If that still doesn't work or the charger port looks fine, try using another battery.