Planes, like the ones that do commercial passenger and cargo flights, are much harder to go fully electric compared to ships. Ships, unlike planes, don't need to maintain a minimum speed and are less constrained by battery weight. Recharging their batteries would take a long time, depending on their size.
Also, you can make nuclear powered ships, though the operating costs are very high and thus unsuitable for most civilian needs.