IT will bolt up, but the 2.5 motor has subaru v-tec which is called AVCS, and it will require new tuning, new eCU and tons more work. it is not a simple *drop in, bolt up and hook up* swap.
Find a EJ205 engine and swap it in, 2001-2005 will be a direct swap and you can reuse everything from your old engine and save $$$ and time. DO not swap to a 2.5 08' motor if you're interested in keeping it simple.
tl;dr: yes it's possible, its not direct you have to have a bit of fun.
You can buy a EJ22 and have it swapped for less then 2500$ at most shops. Don't get a JDM motor as well.
__________________