"The yard is over there."
Easy way to think of it is: Koko = here (think of something within reach) Soko = there (think of something within reach but easily within view e.g. a pen on the coffee table on the other side of the room) Asoko = over there (think of something rather far away, something you might not be able to see, something you might use an exaggerated arm movement to indicate where it is. For example, say the park is all the way down the street (think asoko), say you're talking about something on TV that isn't here in the slightest (think asoko), say you are talking about something in a different place or country altogether (think asoko).
Not sure if that helps but it's one of those concepts that is worth thinking about more deeply. The "ko-so-a-do" pattern is used in many word groups such as 'kocchi, socchi, acchi, docchi' and 'kochira, sochira....etc.'
The two sentences have a slight difference in focus. Remember that は is the topic marker, so 庭はあそこです translates roughly to "(as for) the yard, it's over there." You'd probably say this if someone were touring your house, and then for whatever reason wanted to know where your yard is (why they didn't see the yard themselves while walking in, I have no idea).
あそこは庭です makes "over there" the topic of discussion. So let's say your hypothetical very confused guest is touring your house and wants to know what that big blank space out there is. At which point you'd go "Oh out there, that's the yard." (Possibly in a tone that heavily implied "also, you may need to get your eyes checked.")
I was wondering the same thing and from what I read 「にわはあそこです」 Translates to, "As for the yard, It's over there." Whereas 「にわがあそこです」 Would translate to, "The yard is the thing that's over there." So if I were to ask, あそこが何ですか？ (What's over there.) You would respond with 「にわがあそこです。」( The yard is the thing that's over there.) Vs if someone were asking where the yard is, 「にわはどこですか。」You would respond with 「にわはあそこです」 (As for the yard, it's over there.)
I'm going to link to the Website I got my information from down below in case anyone wants to do any further reading. I would definitely recommend Tae Kim's Grammer guide for anyone if they don't find the answers they're looking for here.
The first thing to realize is that です and ます are NOT interchangeable. ます is always only one part of a whole verb, while です is a complete verb on its own.
So, です is typically translated as "is/am/are", so you would use it when you want to say something is the equivalent of something else, e.g. "my name is John" or "I am John" = ジョンです.
On the other hand, you would use the ます form for any other verb, for polite positive sentences, e.g. "I eat rice" = ごはんを食べます.
In this case, we want to say "the yard is (that place) over there", so we use です. However, we can also say "the yard exists (in that place) over there", so にわはあそこにあります is also an acceptable alternative/equivalent translation.
In this case, I suspect it's just Duo not having all the potential "correct" answers ready. お庭 is not that common, but it's not unheard of either.
However, instead of learning when it's wrong to put お before a noun, I would recommend learning which nouns commonly have お before them. As you might be able to tell from the language I have been using, there actually isn't a rule about which nouns get お and which don't. There aren't too many that routinely get お, and even fewer that require it.