Using detergent on a fuel spill from a boat is not an illegal act, and it is unlikely that you would go to jail for doing so. However, it is important to note that certain detergents and chemicals may have environmental implications and may be harmful to marine life.
If the fuel spill is large, it is recommended to contact the local authorities or the coast guard to assist in the cleanup, as they have the necessary equipment and expertise to handle such situations. It is also important to follow any applicable regulations and guidelines when handling and disposing of hazardous materials.
In general, it is always a good idea to act responsibly and take the necessary precautions when dealing with hazardous materials or spills, in order to minimize any potential harm to the environment or to yourself.