Have you checked to make sure there is nothing in the port? As in dust, food, etc., as that can cause the connection to not be secure.
You don't say if it works with the original one, if the original one still works. If not, you may want to try a charger made for that device. Not the 'can work with' kind you can get at most stores, but one made for that device. I know someone with the same issue, and for some reason the device only charges/allows file transfers when using the original cords. Not all of them are alike, contrary to what those making them say.
Also, are you sure it isn't the battery? They die after a while and need replacing. If you can, I would check that as well.
If none of these work, you will have to check (or have someone check) to see if the port is damaged and needs replacing. If that is the case, the whole motherboard may need replacing.