Switching drill batteries
Batteries are not as simple as they used to be. This isn't like swapping a C-cell for a D-cell with some wire to make up for the different size.


Voltage


Based on the names, it sounds like you are mixing 18 V and 20 V batteries/tools. That may be close enough to be OK, or it may not.


Discharge rate


Different battery technologies can handle different rates of discharge. If you have a battery that can't output high current as well as the original then you may find performance problems or serious overheating problems.


Charging


All batteries used to charge pretty much the same (except the alkaline batteries that should never be recharged) - essentially push current into the battery "backwards" and keep going until the battery output voltage shows that it is fully charged.

But the circuits are now a bit more sophisticated and will typically perform some tests of the battery to determine the current charge level and then charge accordingly. In order for this to work properly, the basic technology (chemistry) needs to be the same and there is often electronics within the battery pack to monitor charging and protect from overcharging, overloads (during usage) and other problems.

Bottom line: Unless you can really determine that the batteries are "compatible except for physical form factor", this is probably not a good idea.