because a computer checks the answers and he accepts only the answer he was programmed for.
I entered "But that person is not the man." Should this not also be accepted?
No, in this case, the sentence is specifically saying that the person is not of the male gender. If you were to say "the man" then that would just make it about the person not being some particular male that you had previously talked about (meaning that they could still be a guy). If you did want to make that type of sentence, then it would be better said as 하지만 저 사람은 그 남자가 아닙니다.
In the real world? Definitely. But Duolingo is being a bit anal about differentiating between 그 and 저 for the sake of learning, even if it doesn't always make for natural-sounding translations.
Should it not be 남자를 as that is what the man is not? 가 makes me feel like that's the subject. Would in any case 를 be accepted as a particle in this case?
definitely not, the particle 을/를 plays an entirely different role of specifically marking a noun affected by a verb.
저는 여자가 아니다 im not a woman
저는 여자를 안 차는다 i dont kick a woman
from what i remember, you use the subject particle 이/가 before 아니다, 없다, and 있다. don't know if there's any explanation behind it but that's what i always go with