Truly it'll be difficult to electrify trucks and tanks, these are heavy duty machines, and aside for energy production, oil and gas serves more purpose in production, like for plastics, Asphalt for road, tires or even paints. All these are reliant on oil and gas which may not go away quickly, for the sake of green energy. Although the oil and gas industry is supposed to face decline, but the resources itself won't be a thing of the past anytime soon.
Somehow I am not too sure that oil and gas will stay with us for a long time. By 2030, as I suppose, there will be a technological revolution in the field of energy. In this scenario, hydrocarbons will become simply useless as an energy source. Yes, they will not be completely abandoned, but the need for them will be reduced to a minimum.
The process of transition to electric cars is already noticeable. Over the past few years, sales of such cars have increased significantly, replacing internal combustion engines. This is only about cars. As for energy for consumers, it is exactly the same here. There are already many alternatives.