Sure but you have to think of the entire system which includes staff, training , charging infrastructure, power supply, possibly fuel for the charging infrastructure, backup/redundancy, maintenance, parts / distribution etc. An entire infrastructure network that had been operating for decades.
Diesel is more than just fuel, it’s an entire system.
I also heard the power companies just don't have the extra power to supply the ferries. The terminals need to be redesigned to receive and emit that much juice.