This revelation came from somebody who would know (a casting director) and was discussed on a Monday upload of the series' rewatch podcast, Talking Sopranos.
The first 40 minutes of that podcast features an interview with a pair of casting directors, Georgianne Walken and Sheila Jaffe, and around the 12:03 mark (embedded below) Jaffe reveals that Stiller almost landed the part of Hesh, but that he was unable to make it for the filming of the pilot because he had a commercial booked just a few days before.
After setting up the background for the story, Jaffe revealed that "Jerry Stiller was Hesh," but Stiller "accepted a commercial on Friday, and was not going to show up during the filming [of the pilot] on Monday."
Damn. Cue every casting director's worst nightmare...maybe.
Instead the guy who now plays Hesh ended up becoming Hesh. That would be *checks IMDB* Jerry Adler.
Jaffe said that a small miracle was responsible for Adler getting the part. As she remembers, she reached out to his daughter (who was an agent) and learned that he was in New York City at the time, where they were filming the pilot. It makes one wonder what would happen if he were in literally any other city on the planet.
"I don't think anybody ever knew that [about Stiller]," Jaffe added. "It would've been a whole different thing."
She went on to state her belief that things worked out for the best, which is a good way of putting it. We certainly didn't mean to shortchange Adler (that *checks IMDB* thing was a half-joke), it's just that we missed an opportunity for Frank Costanza to play Tony Soprano's advisor/friend.
It would've been interesting, but such is life.
As we said 30 seconds ago, Jaffe revealed the information around the 12:03 mark below: