Adams wrote down the idea without the typical phrases one would type into a search engine. Mind that the context is a treatise about hereditary disease (Weiss 2008 even highlights various anticipations of insights of Mendelian genetics).
Adams (1814, p. 32f):
"In a state of nature the race of all gregarious animals is probably progressively improving, as far as is consistent with their capacity for improvement. The strongest male becomes the vir gregis, and consequently, the father of most of the offspring. In a ruder state of human society, or rather in its earliest formation, something of the same kind may prevail; but in a more advanced stage, sufficient provision is made by the preferences which health and intellect will for the most part produce in either sex.
Another provision arises out of climate; which we have seen is, in some cases, the only means of exciting a diseased susceptibility into action. Those constitutions, which are peculiarly susceptible of such diseases as are excited by climate, fall an early sacrifice; hence, the propagation from sources gradually lessens, and the disease would cease altogether, were it not that parents, free from such susceptibility, occasionally produce an offspring in whom the susceptibility originates.
Thus we see the natives of warm climates, when removed to colder, are peculiarly liable to scrofula; and it cannot be necessary to add, how much the natives of colder climates suffer under the Tropics, from causes which produce little or no effect on the offspring of the old inhabitants. By these means a race is gradually reared with constitutions best calculated for the climate: a law which, I suspect, has been too much overlooked, in our inquiries after the causes of the more marked varieties in the human species."He continues with examples of artificial selection by breeders, especially the ill consequences of inbreeding, ruminates on eugenic laws against inbreeding, and so on. See for yourself or read the article by Weiss (2008), who also discussed other anticipations including Matthew's.