OBW -> CTW Engine swap???

Okay my crosstrek mechanics, serious hypothetical questions…

Let’s say I acquired the engine of a 24’ OBW and attempted to put it in my 24’ CTW, what barriers would I run in to? Could I swap the transmissions as well?

Please let me know your input as this would allow for a crosstrek to be turbocharged.