sportrak engine HELP


I need to get a new engine for my 92 reg sportrak, does anyone know if a newer say 97 reg sportrk engine would fit ok??? or do i need to get a 92 reg engine. I know older parts dont fit the same but dont know about newer ones and dont want to waste a couple hundred on a engine that wont fit!