If Joseph Smith wrote the Book of Mormon we might expect him to avoid including anything which would seem obviously wrong to his readers. So why would Joseph use “Alma” as a male name?
While Alma may be a female name today, it was used as a male name anciently, as attested in discoveries such as Ancient tablets at Ebla and the Bar Kokhba letters, dating from the period of the Second Jewish Revolt in AD 132–35
From Matthew Roper:
As can be seen, critics have had a lot of fun with the name Alma, however, in the 1960s Israeli archaeologist Yigael Yadin discovered a land deed near the Dead Sea dating to the early second century A.D. and rendered the name of a Jew mentioned therein as “Alma ben Yehuda” showing for the first time in modern history that the name Alma was an authentic Hebrew male name. Additional research in Ebla, in what is modern Syria, has also turned up this name showing that it goes back to nearly 2200 B.C.– Matthew Roper, “Right on Target: Boomerang Hits and the Book of Mormon,” Proceedings of the 2001 FAIR Conference (August 2001).
Why would Joseph Smith take a chance on a name that people would think is a mistake? Why would he include something that would be a likely distraction?