No, a 1999 Dodge Ram 1500 transmission will almost certainly
not work in a 1994 Dodge Dakota. While both are Dodge trucks, there are significant differences in transmission types, bolt patterns, and overall dimensions between the two vehicles across those model years. The computer interfaces would also be incompatible. Even if you found a way to physically bolt it up, the electrical system wouldn't work, and the transmission wouldn't function correctly.
You need to find a transmission specifically designed for a 1994 Dodge Dakota.