The G30 5 Series started with the N57 and moved to the B57. Both are called 530d on the boot. Workshops order the later engine for the earlier car, and the earlier engine for a 540d, because the names sound like a sequence. The mounts, the emissions hardware and the computer are a sequence only on paper.
The year is not enough
A 2017 530d and a 2018 530d can sit on different sides of the change. The VIN settles it. B57D30A, B57D30B and the tri-turbo-era hardware on the M50d side are different turbos again. A 530d single-turbo B57 does not become a 540d because you wanted more power.

Checking a used B57
These are younger than the N57s we are used to seeing, so the failures are often the cooler, the turbo actuator or impact damage rather than a tired bottom end. Look for coolant crust at the EGR cooler and for an intact harness across the head. The oil pan still depends on xDrive. A clean B57 of the wrong pan is the wrong engine.
Mileage in the 80,000 to 150,000 km range is ordinary for these cars and is not a reason to refuse a unit with the right code. Metal in the oil is a reason to refuse any mileage.
Order by code
Send the VIN. We will say N57 or B57 in the reply, and we will link a unit only when the code matches. If you have already been offered "a 530d engine" with no code, do not pay them either until the stamp is in a photo.
B57 guide · N57 guide · B57D30B from a 640d
Keep the emissions hardware with the engine
The B57 and the N57 do not share the EGR cooler, the sensors or the engine computer. Transferring the old N57 cooler onto a B57 because it looked similar is a leak and a row of fault codes. Use the hardware that arrived on the engine you ordered, and replace only the pieces that are actually damaged.
After fitting, a long enough drive for a full regeneration matters. Short trips are how a good diesel is reported as a bad one.
The yard is at Andreas Meyer Straße 38, 22113 Hamburg. Call or WhatsApp +49 15510 030835, or email autowerkeengines@gmail.com, Monday to Friday, 9:00 to 16:00 CET. Shipping is 249 € per order. We are an independent seller, not BMW AG.