'It is the chocolate' is obviously correct in a word for word sense, but if you wrote 'It is chocolate' you would have got it correct (Take comfort, those who put 'It's chocolate' - I guess duolingo just doesn't like contractions, even though we know this is the same!).
In Italian it is common to put 'the' in front of lots of things even though when you translate it to English you wouldn't actually say 'the.' If you just accept it as a rule and move on, you'll do well!
'This is chocolate' would be 'Questo e' cioccolato.'
I think the official translation is correct. Example: I'm feeling sick. It's the chocolate - in which case I would use this sentence in Italian. Please comment if you disagree as I have no real-life experience with Italian, but this logic would work in French and Portuguese (cognate languages).