this is from the Harvard Health one, and is the main point I was making, but they say it better:
"It is true that fat has more calories than carbohydrates, including sugar. But by that logic, a sugary beverage is better for you than a handful of nuts. That’s just not what the unbiased studies have shown. Looking only at calories ignores the metabolic effects of each calorie; the source of the calorie changes how you digest it and how you retrieve energy from it."
In other words, it's not about calories as much as glycemic index and how your body metabolizes the calories and what it does to your body and its systems.