It is possible that you don't have the adapter fully in the charging port or it is possible your charging port may need replacement. Before attempting to replace your charging port check to see if the cable & adapter will charge another device it is possible it is a faulty cord or adapter
I found a battery wire that is soldered to one of the three pads on the main board was not connected they felt tight but were being held in place by the plastic insulation. I stripped back the insulation(about 1/16 inch) and resoldered the connection