I think in a gym with only two people in the middle of the night, it'd be normal to introduce yourself. It'd be more awkward not to at least say, "Hello, how are you doing?" You probably wouldn't ask if the person was married, or about children. Instead, you might talk about workout schedules, and why they were there at that time.
I think movie stars sometimes like talking to regular people, but usually if they aren't recognized. Travolta is a friendly guy anyway, but I suspect he was testing the waters with a guy he found attractive who, after all, looks a little bit gay. He didn't grab the guy's package, follow him into the shower to stare, or do anything inappropriate or offensive. Any normal straight guy should be able to handle it, and be a little thrilled they met Travolta also. A totally empty gym would be convenient if two guys were interested in sex, because they could just do it in the shower or locker room.
John's patter about marriage and children would just be an opener, giving a gay guy a chance to say, "I'm gay." There are many gay guys who wouldn't mind jerking off with John Travolta, or possibly having oral sex because he's a star. Aside from that, he's not in terrible shape or bad looking for a man of his age, used to be a big sex symbol, and he's reportedly well hung. That's a big plus with most gay men. Some older gay guys with huge dongs go well past their expiration date, compared to their not-so-well-hung counterparts, and that's when they aren't movie stars, but just in reasonably good shape and nice looking.
Yeah, this straight guy was onto him, and the guy probably just didn't give any signals, and therefore John could see it was a no-go. Like I wrote, a gay guy would just tell him up front that he was gay, or look at him suggestively or ask him if he'd like to fool around, or talk about how horny he was.
As writer/academic Camille Paglia pointed out once, she envied gay men that they would go about having sex in a straight forward manner, when they wanted it, and skipping the small talk and pretense. They can do it when they're horny, and don't want romance or a relationship. Women who do that would be branded as sluts.