* Engine: The transmissions are matched to specific engines. If the 1997 truck had a different engine than the 1995 truck, the transmission may not be compatible. You need to match the transmission to the engine's output shaft and bellhousing bolt pattern.
* Transmission type: Make sure both trucks have the same type of automatic transmission (e.g., 3-speed, 4-speed, 46RH, 47RE etc.). Even if they are the same number of speeds, internal differences might exist between model years.
* Transfer case (if 4WD): If it's a 4WD truck, the transfer case needs to be compatible with the transmission.
* Wiring harness: The wiring harness for the transmission might be different, potentially requiring modifications or adaptations.
In short, while they *might* be similar enough, it's risky to assume compatibility. You need to verify the exact transmission model numbers (found on a tag on the transmission itself) for both the donor 1997 and the recipient 1995 trucks. Then, you can research whether those specific transmissions are interchangeable. A mechanic specializing in Dodge Rams from that era would be the best resource to determine compatibility for sure. Simply having the same year truck doesn't guarantee transmission compatibility.