Diesel seems to be able to sit for years and still work good. So I would not be afraid to use 3 year old diesel. Now algae is a whole other thing.
I have had two diesel boats. Both at some point had algae blooms even using bio bore. (Boat was inland in temps over 100 degrees. Diesel foaming out the vent lines down the side of the boat.) I think it was from the fuel dock diesel, but water in boat fuel tanks happens. (Comes in likely because the fuel tank cap which points up. So splashing water, rain, and washing the boat all can let water seep in. Vent lines on side of boat take in water from spray and condensation from being in humid places year round.)
If you do have algae pump out the fuel, it clogs your filters and likely makes a more inviting home later. First time it happened I filtered it via a transfer tank. (Now use for pumping old fuel out of my Gator, snowmobiles, and other equipment. We don’t have any non-ethanol pump options here in CA so gas goes stale after 6-8 months.) Even after filtering the fuel and putting it back in I still had heavy algae on primary and secondary filters. (Some diesel stays in the tank and the algae lines the tank, fuel lines, and IP. Second time it happened I pumped it out and took it to hazardous waste 5 gallons at a time. Put in fresh fuel and a double dose of bio bore.
At a minimum I suggest suck out the fuel and filter it. But suggest you just dispose of it.
I used this generic Chinese made transfer tank the first time due to its low cost. I added a two filter system to it. Changed the filters after pumping it out. So pumping back in it would go through two new filters. Remember filters work in one direction. Had I not swapped the filters around at a minimum (I replaced them.) when the diesel went backwards to fill the tank, it would have flushed the algae out of the filter back into the tank.
I used one of these generic China ones, added a two filter diesel set up to filter and do water separation.