If new diesel cars are available in your area, the engine you are replacing is the same model year or newer than the vehicle and most importantly the engine you are putting in the vehicle was legally sold in your area in a new vehicle you should have no problems.
In California where diesel cars are not available you will end up with a vehicle that cannot be registered.
You don't inherit the world from your parents, you borrow it from your children.
1979 Unimog 416 Expedition Camper
1974 Unimog 421
2004 Dodge Ram 2500, 4x4, Double Cab, Cummins Turbo Diesel
2006 25' Airstream International CCD
2009 Harley Davidson
Sugarloaf, Boulder, CO