These transmissions are not interchangeable. These Dakotas use either the 42RLE (DG6) or 45RFE (DGQ) transmission and the Ram uses either 45RFE or 48RE.
To find out which one is on your truck, the best option would be to call your local dealer and provide them with the VIN and they can look up the correct transmission part number. That might help you narrow down the search.
I have attached the transmission replacement procedure below for your reference.
Let me know if you have any questions.
Images (Click to make bigger)
Friday, October 21st, 2022 AT 7:58 PM