I did mine a couple of months ago, think it was about $90 new from subaru dealer. Replaced it myself, is a bit fiddly to get to the bolt but not that bad and only took me about an hour which isn't too bad since I had never removed the TMIC before.
Apparently its crucial to position the new knock sensor at the correct orientation/angle, I just took picture of old one in place then put new one as close to that as possible. Also don't have a tourqe wrench so just did the bolt up about as tight as it was when removed it.
So far all good and CEL hasn't returned, so I'm sure you could DIY if wanna save some cash.