Okay, first check the charger power cord at the entry to the charger. If the intermittent charging problem is related to the cord position, then the problem is there. It sounds like you are not at all electronics savvy, so then take it to a qualified repair person to fix the cord issue. They may also be able to fix something deeper in the circuit, if that turns out to be the problem. Why mess with it yourself?
Second, battery packs can have their internal cells replaced, BUT, usually it isn't easy to do, and is not a good thing to attempt if you don't already work with electronics. Many of these battery packs are inside heat welded plastic casings, and it's possible, but tough to get them apart without destroying them or knicking batteries inside with a cutting tool -- which can also be hazardous.
Third, batteries and chargers MUST be matched for type, charge current, and over-charge protection, or a fire or explosion can result. Batteries can be many different basic types: Li-poly, Li-ion, Li-Fe, NiCd, Nimh, etc. And each type has specific charging requirements, and within that range each different size and configuration of cells has different requirements. Again, if a person understands all of the technical details and has electronics experience, it's do-able. But if you don't, it's definitely a bad idea.
Again, it's often possible to find a service online that will re-cell batteries -- just like re-fillers for ink cartridges. That would be far preferable to having to do that yourself.
Ideally you will get your charger professionally repaired, and have matching cells re-celled into your battery pack, and at far less than the $500 you spent on th drill.