Super easy and it wont ruin your drill.
You can potentially do this for free like i did if you have spare parts laying around
-wire connectors x2
-ac/dc converter (I used an old laptop power bar.
My drill is a 16.8V model and the power supply i had laying around put out 20v. Close enough.
First I opened my drill to see the type of connections.
For my drill i needed two male connectors so they can slide into the drills female connection.
Plug the power supply that your going to use in and with a voltmeter test the output to see which wire is positive and which is negative. Mark them so you know which is which
My drill would not run if the polarities were switched.
Unplug the power supply and attach a connector to either wire. i used red for positive and blue for negative.
Plug the power supply in and plug the drill in to the power supply and give it a test.
I hang my power supply next to my work bench and when i need to use it i just plug it in and plug the drill in and off i go.
then to switch to batteries I just unplug the drill and pop the batteries in.