Diesel and #2 fuel oil have historically been the same. They add dye to the untaxed fuel oil so they can tell if they find it in the tank of your truck.
My oil bill has been marked No.2 Fuel Oil/Dyed diesel.
Recently there are additional requirements that diesel fuel be low-sulfur for road use. I don't know if fuel oil suppliers are selling the low sulfur product for heating oil. Idon't know how much difference it makes in cost if the low-sulfur requirement is applied to fuel oil.
You can use diesel fuel in your heating unit, but you shouldn't be using untaxed high-sulfur fuel oil in your vehicles.