The data speak very strongly against this conclusion. The data is deep and broad that marriage leads to better outcomes, and is a result of marriage itself, not selection for people who tend to get married, although that also helps. Also, this doesn't mean that every marriage results in better outcomes for every couple, just that it tends to do so.
One study that summarizes previous studies is below, but there are literally hundreds of others.
The Effects of Marriage on Health: A Synthesis of Recent Research Evidence. Research Brief (https://aspe.hhs.gov/reports/effects-marriage-health-synthes... Note: an official US government web site.)
"Married people are generally healthier than unmarried people, as measured by numerous health outcomes.(1) To investigate the complex relationship between marriage and health, this review scrutinizes recent research, focusing on studies that use rigorous statistical methods to examine whether marriage is a cause of these better health outcomes."