I think this is a lot more complicated than people seem to think. First, for most people it's not going to make a huge difference. The most important thing to to exercise, so if having a fan makes it more enjoyable and induces you to work out more, turn it on.
When it's very hot, your body burns energy trying to stay cool. So if you're just sitting around in 100 degree weather, you will burn more calories than if you sit around and it's 75 degrees. "Hot weather can make you feel sluggish because your body has to work harder to keep you cool while pumping blood to your muscles." (
https://qz.com/693468/how-to-deal-with-the-heat-and-optimize-your-summer-run) "living in extreme heat is simply hard work for your body. While it’s a passive process for the most part, sweating buckets can burn some calories, even without any exercise." (
https://2newthings.com/your-bodys-efforts-cool-down-use-up-lot-extra-energy/)
But when you're exercising, if it's hot out, your are naturally going to more less intensely. And this isn't just a matter of comfort. There's a reason that professional runners go slower in hot weather, and it's not because they are lazy. Your body regulates itself so you don't raise your internal temperature to a dangerous point. (For details, see
https://www.outsideonline.com/health/training-performance/how-elite-athletes-respond-extreme-heat/ which reports on the issue in a lot of detail. The many scientists who have studied it don't think it's a stupid question.) That's not going to be a big factor for most people, but the concept is the same: You are going to bike/run/whatever slower if you don't have the fan running, and that might more than offset the extra work your body does to stay cool.
In summary: Being hot burns calories; slowing down in response to heat reduces energy. The net effect is hard to determine and varies, so do what you prefer and what keeps you going.