Translation:Why was it boring?
んですか is for asking an explanation about something you're seeing or hearing. You usually give a corresponding explanation with んです.
つまらなかったですか。 = "Was it boring ?" - When I'm just expecting a yes or no answer.
つまらなかったんですか。 = "It was boring ?" - When you've told me it was boring and I want to know why.
だれもいなかったんです。= "Nobody was there" - For instance, giving an explanation (even spontaneously) as to why I'm coming home early.
だれもいませんでした。= "Nobody was there" - For instance, answering a question about the number of people there.
Therefore this ん is not mandatory in the sentence here, but it emphasizes that I'm reacting to you telling me it was boring.
Yikes, I can't believe Duolingo casually drops んです in like this. As a side note I hate this translation, since it utterly fails to capture んです's nominalising aspect, and makes the sentence seem absolutely no different to どうしてつまらなかったですか？ for people who don't already know how んです works.
This is a perfect example to see how this ん works. If it was simply つまらなかった this sentence would most likely be translated as "Why were you bored?", but because of the presence of the ん in つまらなかったん this implies that you were talking about something previously, therefore transforming the sentence into "Why was it boring?"
I think using "tsumaranai" in reference to a person is actually quite rude, and would be translated as "boring" rather than "bored" (つまらない人 tsumaranai hito is a boring person).
If I say つまらなかった (tsumaranakatta), I'm saying that something was boring, which in English can be interpreted as "I was bored", but that's not the actual meaning of the Japanese. So you could interpret this sentence as "why were you bored?", but it's just that, an interpretation rather than a translation.
I think you could use "taikutsu" for your question, どうして退屈でしたか (doushite taikutsu deshita ka). Maybe.
The interrogative is a grammatical mood.
Indicative mood - Describing how something is: "I am late."
Imperative mood - Expresses a command, plea or advice: "Don't be late!"
Interrogative mood - Expresses a question: "Are you late?"
Conditional mood - Expresses some action or state that is dependent on another condition being true ("if"s and "when"s): "If I am late, I will be fired."
Subjunctive mood - Expresses a hypothetical or unreal situation, like a wish, possibility, desire or an imaginary situation: "Were I to own a car, I would never be late." The subjunctive in English is more limited than in some other languages (e.g. Romance languages) and it's often combined with the conditional mood.
I believe the word you are looking for is 退屈 (たいくつ), which means "tedium, boredom", and used in an intransitive way...
I do find it interesting that the dictionary entry didn't label it as a noun that can take する, but there are several example sentences with it being used as a する verb... or as a な-adjective either since it acts that way in other example sentences...
"Naze" is more formal than "doushite". Either should be fine.
From a lingQ question about whether to use doushite, naze, or nande:
Hi, I'm here for a native point of view.
As Steve said, no difference in meaning.
In a mean time, like benhenschke said, I'd use doushite or nande in casual conversation with my friends.
If I'm in more fomal situation, I'd say naze-desuka.
Above all, don't worry about it because it doesn't really matter and I'll understand you perfectly well ;)
Try and think of かったです as a set that means the past tense of an i-adjective. PuniPuni Japanese as a good article about conjugating adjectives.
For a more technical explanation, i-adjectives act like verbs, so if you say つまらない (tsumaranai) by itself, it carries the idea that "it is boring". です doesn't add the meaning of "is" because the i-adjective itself already carries it, so the only reason to add です is to make your speech more polite. When you say つまらなかった (tsumaranakatta), it means on its own "it was boring". If you want to be more polite, you add です. The かった shows us that the adjective is in the past tense, and the です shows us that the speaker is using polite language. It doesn't really have a grammatical function, so we don't conjugate it.