If you have already I2C pull-ups on the beakout board, you can't use SDA/SCL on the DUE side since they have 1K pull-ups. However, SDA1/SCL1 (Wire1) don't have pull-ups and can be used by adding this line at the beginning ogf your sketch:
Thanks! I tried that but it made no difference, the MPU 9250 is still failing to connect. I dont understand why the BMP280 magnetometer is working but not the MPU9250 as they are on the same IMU board
I am getting numbers being output on serial even though the connection has failed which seems weird.
Your issue may be, the MEGA is a 5 volt device, the Due is a 3.3 volt device. The MPU9250 is a 3.3 volt device but inputs 5 volts to an on board 3.3 volt regulator. Well the one I got does. I soldered the bypass jumper on my MPU9250 board so I can input 3.3V directly.