It's hard to pick a winner right now. Magnesium provides the highest voltage, but aluminum lasts longer (5 times more than magnesium) and aluminum anode alloys are slightly more active than zinc.
So why is zinc the most common material?
It's an inexpensive material that does work well in most saltwater applications. Pure aluminum as an anode material is useless because it immediately forms a layer of oxide, isolating it from the outside world, so that it cannot be further consumed, preventing the anode from working effectively and failing to achieve the purpose of protection.
It was not until the middle of the 20th century that it was discovered that adding a small amount of zinc and indium to aluminum could overcome the problem of aluminum forming an insulating oxide layer, and aluminum alloys were developed.
What equipment needs to be protected?
The type of ship will determine how it is protected. For example, a fiberglass hull with an inbuilt engine requires much less protection than an aluminum hull or aluminum stern-drive boat. The most reliable way to determine if a boat is fully protected is to measure its cathodic protection voltage, or "hull potential".
River vessels are mainly bronze and stainless steel components and can be protected with zinc or aluminum anodizes without worrying about overprotection. Overprotection is possible only if the weight of the anode is too large, causing the ship to sink! The voltage generated by the zinc or aluminum anode does not cause any damage, and the maximum voltage that can be generated is the voltage of the anode itself, no matter how much anode material is added, which is constant. Effective protection can be achieved by using magnesium anodes on fiberglass hulls in freshwater areas.
Be careful when using magnesium alloy anodes on aluminum or wooden boats, as overprotection may occur. Steel hulls need to be over-protected, and excessive protective voltages can strip paint off the hull.