Well, it is a bit more involved than that, but yes, the Getrag 250G is the same tranny that was used in the E36 M42 cars in the USA.
And yes, the ZF that was used in 328's and M3's can also work on the M42.
You also need pedal box, driveshaft (might be different for auto and manual), delete the ECU, etc.