We can’t blame this contradiction on Jesus changing things because Deuteronomy is contradicted in Isaiah 56:3-5 as well as the aforementioned Matthew.
The contradiction might be explained by errors in translation. The same hebrew word for Eunuch also translates into slave, which would make the verse in Deuteronomy nothing more than bigotry against the lowest class. At best we can say it’s a glaring contradiction. At worst it’s basically racism. It could very likely be both (I mean they did choose a word with two meanings; maybe ‘Eunuch’ and ‘slave’ were synonymous). Unfortunately, we’ll never know because everyone who wrote the bible is dead.