Your engineer friend is mostly correct. There's a very small difference in energy expenditure per unit of distance (ie, a mile).
There's a substantial difference in energy expenditure per unit of time, with running burning more than walking.
Then there's the question of the energy supply. A walker can keep going forever because modest walking burns fats.
Running at a decent effort, like marathon pace, only gets you so far because you burn carbs, which are limited. That's why we "hit the wall" at 20 miles.
If you're entered in a 3000-mile L.A to N.Y. race without stages, you might do very well by walking 16 to 20 hours a day.
If you're entered in a 26.2 mile race, running wins.