The US Supreme Court has made some decisions that legal scholars, other judges, lawyers, and people in general have strongly criticized as mistaken, but none anywhere nearly as wild as the one suggested in the question. Many such, well let me call them "disputed", rulings have been later overturned by the court itself. A well known example is Minersville School District v. Gobitis, 310 U.S. 586 (1940), which was overruled a few years later by West Virginia State Board of Education v. Barnette, 319 U.S. 624 (1943). Many of the so-called Lochner era economic decisions were also eventually overturned by the Court itself.
Some disputed holdings have been altered by changes in the law, State or Federal. Some have been overturned via a constitutional amendment, such as Barron v. Baltimore, 32 U.S. (7 Pet.) 243 (1833), which is now held to have been overruled by the Fourteenth Amendment, although the Court did not come to that conclusion until early in the 20th century.
Perhaps the most notorious case is Dred Scott v. Sandford, 60 U.S. (19 How.) 393 (1857) which held that a person of African descent could never become a US citizen, and that Congress was without power to prohibit slavery in any US state or territory. This is perhaps the most denounced decision of the US Supreme Court in its history (See the linked Wikipedia article for a few such comments.) This decision was undone de facto by the outcome of the US Civil War, and de jure by the adoption of the Thirteenth and Fourteenth Amendments.
Some cases have later been treated as "bad law" even though not formally overturned. An example is Korematsu v. United States, 323 U.S. 214 (1944), in which the Supreme Court upheld the removal of US citizens of Japanese ancestry from the US Pacific coast during WWII, and their confinement in what has been described as a series of concentration camps. This has not been formally overruled, but in Trump v. Hawaii No. 17-965, 585 U.S. ___ (2018), Chief Justice Roberts wrote:
The dissent's reference to Korematsu, however, affords this Court the opportunity to make express what is already obvious: Korematsu was gravely wrong the day it was decided, has been overruled in the court of history, and—to be clear—'has no place in law under the Constitution.' 323 U. S., at 248 (Jackson, J., dissenting). [quoting Jackson's dissent in Korematsu]
And some cases, although much disputed, still stand as good law. The case of Flood v. Kuhn, 407 U.S. 258 (1972), holding that Baseball continued to be exempt from anti-trust laws, federal and state, has been much criticized, but remains in force to this day. (See the section "Subsequent jurisprudence" in the linked Wikipedia article) Congress has not, so far, acted to limit the exemption, as the opinion indicates that it had the power to do.
In short, a US Supreme Court decision, however "erroneous" or "absurd" commentators or the public may consider it, remains the law of the land until it is overturned or distinguished by the court, or made obsolete by changes in statute or in the Constitution itself. It the highly unlikely situation described in the question, John Doe would remain in prison until his sentence expired or he received a pardon.