Not yet mentioned is the efficiency of the engine or motor.
The fuel efficiency of motor vehicle engines is around 40%. This means the realized energy of gasoline is probably is closer to 18 MJ/kg. Electric motors have a much higher efficiency rate, about 85% as the mid range. So the realized energy of the current best batteries is probably closer to 0.8 MJ/kg.
Even with much higher efficiency motor, it is still well below.