Be careful with years and models.
For the 99-01 Impreza 2.2 FSM (a 99 legacy 2.2 should be same), You don’t want a 2.5 or turbo. Which aren’t common in those years but turbos get a lot of online attention.
For 00-04 FSM you don’t want turbo wiring.
Don’t know how they all are but I’ve downloaded a few from these links in the past.
Should be able to just put the ECU wiring side by side and compare to start.
https://sl-i.net/FORUM/showthread.php?18087-Subaru-Factory-Service-Manuals-(FSM)-Every-Model-USDM-EU
2002 ECU pin outs:
https://www.xcceleration.com/pinouts.htm