I, like far too few of my fellow Americans, enjoy reading books. One of my favorite authors is Robert A. Heinlein, one of the "big three" of classic science fiction authors, along with Isaac Asimov and Arthur C. Clarke. I've heard him described as somebody who would agree with the modern Republican Party. That is an extraordinary claim, especially for somebody who supported Upton Sinclair when he was running for the office of Governor of California, and as another science fiction author once said, extraordinary claims require extraordinary evidence.
Heinlein's views on sex do not seem similar in any way to those of the modern Republican Party. In many of his books, future societies are confirmed to have a total absence of a taboo against nudity. Whether it's the inhabitants of Luna Colony rarely being clothed or the distant future of Lazarus Long describing that people only wear clothing for utility, instead of modesty, his societies have far less fear of the human body than the typical Republican. Even in less far-future-seeming societies, such as Stranger in a Strange Land, the more positively-portrayed characters tend to be more sexually-open.
Sex was merely the obvious way of separating Heinlein from the typical Republican. Militarism, and economics also separate him, but one has to dig deeper than with sex.
Due to Heinlein codifying much of the military science fiction genre with Starship Troopers, many of his political statements are often interpreted as highly militaristic. In that novel, the Terran Federation (government of earth) grants voting rights to only those who have completed two years "Federal Service." The narrator's form of Federal Service was the Mobile Infantry, and due to the fact that the M.I., the K9 Corps, the combat engineers, and the Navy were the only forms of Federal Service that were shown in the novel, many have interpreted this as a requirement of military service for voting rights. However, this is not the case, as the novel specifically stated that there are many other types of Federal Service, for example, the electrical/computer engineering, which is what the narrator's friend from the beginning gets. In fact, Heinlein confirmed in comments outside of the book that military service is only a small percentage of the different types of Federal Service. It's just the type that he chose to write about, and the type that he knew most about, being a graduate of the US Naval Academy.
With regard to economic views, Heinlein's novel The Moon Is a Harsh Mistress causes many to assume that he's in the same league as Ayn Rand. This is because Luna Colony is presented as an anarcho-capitalist society, yet better than the societies that exist on earth. However, this is made possible due to a radically different concept of marriage providing a safety net instead of the government. In fact, it is stated that there is no way on earth that it could succeed. Even then, the society does have some other definite flaws.
In summary, it's wrong to broadly paint Heinlein's views as right-wing due to their complexity and the fact that different books often expressed wildly different views.