Inaccurate statement.
https://qz.com/2113243/forty-percent-of-all-shipping-cargo-consists-of-fossil-fuels
40% of traffic is for petrochemicals, which according to this article is coal, oil, gas, and things derived from them, which would include fertilizer and plastics and probably some other stuff too like industrial lubricants, asphalt etc. Not just fossil fuels, so not all that 40% would be affected by a switch to renewable energy. It's also worth noting that building out renewable energy generation involves shipping a lot of hardware around the globe as well.