Duolingo might be very specific here. "He is a Swiss." would be "Er is ein Schweizer." In German, and I think in English too, the indeterminate article shifts the emphasis a little.
Er ist Schweizer. (emphasis like: Er ist kein Deutscher. He is not German. That's quite neutral.)
Er ist ein Schweizer. (emphasis like: Er ist einer von den Schweizern. He is one of the Swiss. meaning he's one of them, not us. It puts a little more distance there.)
However, this nuance and shift in emphasis is hard to detect even for a native German. (Not sure about the English though)
You could say, "He is a Swiss man" or "He is from Switzerland," but "He is a Swiss" is improper. I assume there is some political or linguistic history around the nationalities that you can't put "a" in front of, but I have no idea what it is. For future reference, it is the same for France, Ireland, Japan and China, and some others, but Spain, Guatemala, Scotland, Germany, Korea, Nigeria, Russia and many others it works. In other words, it sounds rude to say "He is a French", "a Japanese", or "a Chinese," the last two are what my grandparents' generation might say, and honestly it sounds racist. But Spaniard, Guatemalan, Scot, German, Korean, Nigerian or Russian are fine. In these cases you can also use "a" if you like: "He is a German/Korean/Nigerian" or "She is a Scottish/Russian/Guatemalan woman" are fine. No idea why.
It isn't improper to say "He is a Swiss". Look under the section for People and Society in https://www.cia.gov/library/publications/the-world-factbook/geos/sz.html: "noun: Swiss (singular and plural)". It's just that in English, Swiss is also the adjective.
So in the German sentence "Er ist Schweizer", is "Schweizer" an adjective? Or is it a noun with no "ein" in front of it? If an adjective, then "He is a Swiss" should be wrong. But if it is a noun with no article, well, we don't have article-less nouns in English, and the only correct translation would be "He is a Swiss."
In previous question when it said Schweizer a put swiss and duolingo put me wrong because i am suppose to say swiss man, and now it says exactly the same and i put swiss man and ita wrong because should be only swiss, then my question ia when to put swiss alone or swiss man when they talk about Schweizer ?