The difference between using gasoline and using biogas is that the proportion of mixed gas entering the cylinder is different. In other words, in gasoline engines
Atomized gasoline: air
and when using biogas
Biogas: air
The proportions are different. As long as the air intake ratio is adjusted appropriately, a regular gasoline engine can run on biogas.