California only allows engine swaps when the engine and emission control systems being used are in an engine-chassis configuration certified by the California Air Resources Board (ARB) or U.S. Environmental Protection Agency (EPA). The engine you plan on using to convert your Range Rover from gasoline to diesel must meet or exceed the requirements for the year and class of vehicle in which it is installed.
We recommend visiting California Air Resources Board to look up this particular diesel engine's California certification. If it's approved by ARB you'll be allowed to switch from gasoline to diesel.
After the swap is complete the engine change must be inspected by an official referee station and must have a Bureau of Automotive Repair (BAR) Vehicle Identification Label affixed to the doorpost.