Translation:Monkeys are not stupid, but smart.
No, they're two different kinds of “but”. Specifically: “sondern” means “(but) rather”, it is used in exactly this kind of sentences, where the first element is negated; the second element is a natural consequence of the first. “Aber” and “doch” mean “however”, they represent the general “but”, where the second statement is just unexpected given the content of the first one (“he is rich, but/however he buys cheap clothes”).
To buld on the above comment, aber indeed can replace sondern in cases such as "nicht zwei, aber drei". However, sondern, as Ly_Mar said, is limited to being used only to dismiss the former claim as imprecise and imply the latter claim as precise, which is the exact definition for "but (rather)" in English. Also, one is much more likely to hear sondern in these cases, especially when paired with a negating word (nicht or kein), so even though both are correct, "nicht...sondern" sounds more natural than "nicht...aber".
As for the doch statement, though both that and aber do imply something in contrary, to say that doch translates as "but" in English is to understate it. More accurately in meaning and function, doch translates as "yet", which we all know means something not just in contrary, but also ironic (though not necessarily paradoxical). I hope that all clarifies.
This is a literal translation of German into English, but in my dialect of English, we would not use this pattern in English to convey the German sentence. Other grammatical patterns in English that could be used include "Monkeys are not stupid, rather they are smart." "Monkeys are not stupid, but they are smart." "Monkeys are not stupid. Indeed they are smart." However, Duo only accepts the literal translation and I feel forced into writing unnatural English.