Captain Heinlein USN?
I think the point of divergence would have revolved around his health. Let's assume he didn't have medical problems, I would be surprised if he reached flag rank. The attributes of a writer aren't exactly those that make a good Admiral. He might have ended up in naval intelligence in a backroom job or in a similar role as he played during the war as an engineer officer. He worked in Philadelphia Navy Yard with Sprague De Camp and Isaac Asimov, maybe he would have ended up as a Captain E and gone on to work with Admiral Rickover on nuclear submarines.
Maybe he would have become like the Captain of the mathematics division connected with an observatory in Blowups Happen. Could he have played a role in the alledged Philadelphia experiment? Maybe he did.
I somehow suspect that he would have found some scope for writing possibly for navy instruction manuals or possibly sea stories rather than SF But moving to SF on retirement and maybe going into politics at a more mature stage and getting elected