The e85 shares lots with the e46 3 Series. So that’s a good place to start. If you google M54 engine you should be able to find which other vehicles it was fitted to.
According to Wikipedia the M54 2.5i was produced 2000 - 2006 and fitted in the following models : 2000–2002 E36/7 Z3 2.5i
2000–2006 E46 325i, 325xi, 325Ci
2000–2004 E46/5 325ti
2000–2004 E39 525i
2003–2005 E60/E61 525i, 525xi
2003–2006 E83 X3 2.5i
2002–2005 E85 Z4 2.5i