"The soldier knows who they are."
Translation:Soldaten vet vilka de är.
You probably saw "hen" because you translated the phrase as "Soldaten vet vem de är", but this phrase is wrong because we are talking about "they" (plural), and in this case you must use "vilka" instead of "vem".
So, in my opinion, Duolingo should have marked the phrase wrong because you used "vem", but instead Duolingo marked "de" as incorrect and suggested "hen" as the correct alternative. The problem is: "hen" was NEVER shown before in any lesson, and it's also a very controversial gender neutral word in Swedish that a lot of people don't use.
The Duolingo Swedish team should correct this exercise and mark the word "vem" as incorrect, instead of "de" and not suggest a word that was never taught before here.
I've removed that. We don't use hen in the course at all, so it must have been added by mistake.
For anybody wanting a reference on hen, please see my post on the word: https://forum.duolingo.com/comment/15916853/The-Swedish-pronoun-hen-how-and-why-it-is-and-isn-t-used
they is meant to be plural here, it's not supposed to refer to the soldier. The soldier knows who they = those people are.
If you're thinking of the usage of they as a gender neutral pronoun, then the Swedish sentence would have been Soldaten vet vem hen är – but without context, that's a less likely interpretation of the English sentence.