You will probably want to recondition the heads as well and this can cost anywhere from 350-1000.
The reason I bring up the heads is the turbo Subaru is known for valve seats going bad. They can cut them out lap them and then cut the stems and put them back in the heads to factory specs but if yours is bad enough like one of mine was then you need a new valve.
The exhaust valves in the 2005 are sodium filled like the STI.
If you plan on a built short block reconditioned heads with stock valves etc, new gasket kit, timing belt kit, water pump, oil cooler (300 bucks), forged rods, crank, pistons etc you will be into it for a lot. Trust me I know
Then add labor if you don't R&R the motor yourself.
A stock STI short block is 1800-2000 so if you go forged pistons, and rods you are looking at 2800-4000 depending on what you purchase with the oil pump and so on.