"My teacher is teaching but I am not listening because I do not have an interest in history."
Translation:Tá mo mhúinteoir ag múineadh ach níl mé ag éisteacht mar níl suim agam sa stair.
According to Lillian211756 above, spéis is accepted for this exercise - perhaps there was another problem with your answer?
The list of acceptable answers isn't computer generated, it is compiled by humans. Duolingo will only accept answers that are on that list. It can spot typos, but it will not accept a synonym for an individual word - the whole sentence must be included in the database. So to accept all variations of nílim/níl mé and suim/spéis requires 4 database entries. Allow for teagasc instead of múineadh and you need 8 entries. Allow for toisc or de bhrí instead of mar and you potentially double that again.