As above, must meet newer emission standards of either the engine block or the car.
You can put a vn 5L into any vn-vs for example, since that engine was an option across the range and they all have the same emission requirements.
In the example of the ls1 into hg above, you still need an engineers certificate. (Well in excess of $1000). Same story with a 5L into hq-vl (technically). The way around that is to retain the original block and bolt the efi parts to it. But that will only be legal on a car that is pre ADR27a.
I know that doesn't apply directly to your situation, but that gives you an idea of how the rules work. Essentially, make sure you stick to manufacturers optional engines if you're wanting to keep it legal and avoid engineers certificates.
Much better off buying another ecotec. They're a superior engine in my eyes.