It really depends on where and when you’re charging.
Electricity isn’t free. I have a PHEV and for me in my area gas becomes cheaper after about $1.80/gal (IIRC). Electricity is more expensive to go per mile if I charge during peak times (for us that’s 4p-8p) when the price jump 3x, from 11¢/kWh to 33¢kWh. So the vehicle is scheduled to not charge during that time.
Diesel will offset that some since it’s more expensive than gas is and has been for years now. No one is going to pay a truck off in 2 years from savings. It’ll be faster, almost certainly. However, saying 2 years can’t be looking at the whole picture.
Meta