Diesel fuel has an 18 month shelf life. Maybe longer.
I have eight-year old diesel fuel that runs in my Ford 6.9 just fine. Can’t tell the difference.