All fairly close... Online Etymology Dictionary says: 1540s, "mounted trooper," from French contraction (14c.) of gens d'armes "men at arms," later applied to military police (1796 in English). Gens is plural of gent "nation, people," from L. gentem (nom. gens) "race, nation, people" (see genus). Related: Gendarmerie. French also had gens de (la) robe "lawyers," sometimes borrowed in English.
As C outlines above, the original plural form, gens d'armes - men of arms - gave rise to the singular form, gendarme, and that in turn produced the current plural, gendarmes...a rather peculiar threeway process!
My apologies, Anne, but just a quick word with C.
On matters French particularly and so close to the anniversary of D-Day, I have to tell you that a friend and I hit the Normandy beaches LAST week and two of my sons and I will be doing so again NEXT week! We had and will have culinary/bibulous rather than military targets!