Hi,
If the tablet hasn’t been charged for over 2 years it may be more than the charge port that needs replacing.
The battery may have become depleted beyond recovery and will also have to be replaced.
Here’s a link to the ifixit [guide|62599] guide.
It shows how the back cover is removed so that access is possible to remove the systemboard so that the charge port can be replaced.
As the charge port is a SMD (surface mounted device) type component, you’ll need SMD soldering skills and tools to effect the repair. This is not a job for novice repairers.
Replacement USB connectors are available from [https://www.mouser.com/Connectors/USB-Connectors/_/N-88hmf/|here] but you’ll have to find the exact one as there are differences as to mounting etc. (compare it to the one in your tablet - look at the position of the mounting lugs and the pins)
If the battery has failed you may be able to source a new one online. Find the battery model number (printed on the battery) and use it to search online for replacements.
If this seems to daunting contact a reputable, professional electronics or mobile phone repair service and ask for a quote to repair the tablet. You’ll probably be told that it is not economically viable (for you) to get it repaired professionally