Yea I would mount it longitudinally so the 20" length mentioned would come into play of how much space we would need past the end of the wrx trans. Not counting a spacer which is another 2" or so. If that motor you listed above fits is 18.3" we need roughly 4" past that to fit it.

I don't see the K24 being much longer than a 2.3 ecoboost and they made that fit so I'd say it's possible.