Like Zeehag said, filter it, a racor
turbine filter is good, two are better.
Some people use a filter funnel at the fuel dock
to keep as much water
& rubbish as possible out of their main tanks
Search for "diesel polishing" will find explanations and options.
Some people pump fuel from main tanks
through a filter to a smaller "day tank" - often feeding the engine by gravity.
Obviously if your engine isn't running that needs fixing too - but no point fixing it and then feeding it more dirty fuel.
If the tank has an inspection/cleaning hatch
transfer/pump fuel into barrels, clean tank manually, flush tank & pipes then filter fuel when returning it to tank.
Otherwise keep polishing, keep changing filter elements.