Unlike diesel fuel, gas fuels are readily ignitable and present a suffocation hazard in enclosed spaces. This is solvable with installation of a proper gas detection system, but if you've ever dealt with the shipping industry you'll know that maintenance is not top of their list.
Also gas fuels require new port-side storage and handling equipment, and in the case of liquified gas this might require a refrigeration system.
Electricity on the other hand is already port-side, and most ports will have a significant supply available.
As for weight, that's not really a problem for ships, especially tugboats. In the case of tugs the near instant peek power of electric propulsion is a huge advantage.