Simply bolt a good crank pulley on there properly first. The keyway isn't needed at all. File/sand it down smooth/flat and install a good pulley. Tighten the bolt very tight and it won't come off. Unlike aluminum motor/heads the crank and bolt are iron.
You probably mean automatic and therefore 2.5 liter engine in the 96 since that's what you're looking for and quoting. 96 is a one year deal where the manual trans got the 2.2 liter.
Either way the 98 motor would actually swap into the 96 just fine, one just requires two more steps or so.
If you need a new engine, just get an EJ22 and swap it in. Used EJ25's are a gamble. type in "EJ25 Headgasket" if you don't already know. Due to high demand (because of frequent headgasket and lower end bearing failures), the EJ25's are expensive...and possibility of headgasket issues is high even on a used motor regardless of miles, they were blowing headgaskets at 20,000 miles.
In the event valves are bent you can get new heads alone and bolt those up with SUbarus updated 610 headgasket.
You can also bolt EJ22 heads and intake manifold up to your EJ25 engine, extending your search options.
i also have an EJ25D engine and could install new 610 headgaskets on it for you if you wanted to entertain buying it...depending where you are, i'm not shipping it.
good luck, you have lots of options.