The word in question is not "man", but "men". According to Young's Analytical Concordance:
MEN, after the manner of - Human, belonging to man, anthropinos.
Romans 6:19 "I speak after the manner of men because..." (page 654)
Given that a man is a human who belongs to men, and is after the manner of men, being human, the word Jesus used in Matthew 11:17-18 is translated by Young as:
"And take ye heed of men, for they will give you up to sanhedrims, and
in their synagogues, they will scourge you, and before governors and
kings ye shall be brought for my sake, for a testimony to them and to
the nations." (Young's Literal Translation)
When Jesus' single sentence here is read as one sentence, it is obvious that Jewish men would be the ones in sanhedrims [Young's spelling] and synagogues. Yet that persecution flows right on into the realms of Gentile governors and kings. This accords with Jesus' mandate to his followers after his resurrection. He instructed them to start in Jerusalem to proclaim the good news of Christ, then to work outwards into surrounding nations and to the whole world (Matthew 28:19-20).
When the context of Jesus' words in 11:17-18 is then examined, the same progression of events is clearly seen. Starting with the Jewish people, who were to be the first given the gospel message, then it was to be taken to all nations in the whole world. Naturally, persecution would be seen to start first in Judaism, then to spread globally. Verse 22 is all-inclusive. Jesus says: "...and ye shall be hated by all because of my name". That means "all men" irrespective of whether they be Jew or Gentile. The word for 'men' is not in verse 22 but the meaning is perfectly clear. Jesus did not say "all Jewish men", did he? But in verse 17 he starts with Jewish men and, by the end of his sentence, incorporates Gentile men.
The apostle Paul exemplified exactly that by being persecuted first by his own Jewish people, especially the religious leaders, but once he had turned to the Gentile nations to spread the gospel there, men who were Gentiles scoured, imprisoned and persecuted him.
This means that it is a big mistake to try to chop Jesus' sentence in verses 17 & 18 in half. Check the Greek to see that there is the word 'kai' (and) after 'synagogues'. The NKJV you quote from misses that word 'and' out, and perhaps that is what gave rise to your question. Yet if the word 'and' is kept in, then we see that Jesus includes Gentile persecution with Jewish persecution, so he is not making a distinction between those men. Neither should we.
I suggest that it is the Greek word 'kai' (and) that is the important one here, for it shows that Jesus meant the 'men' included Jewish and Gentile men. The matter is clinched in John 15:18-19 where Jesus s
"If the world doth hate you, ye know that it hath hated me
before you. If of the world ye were, the world its own would have been
loving, and because of the world ye are not - But I chose ye out of
the world - the world - because of this the world hateth you" (YLT). [Emphasis mine]
The world of mankind that hates Jesus also hates his obedient followers and Jesus warned all his Jewish and Gentile followers that they would be persecuted by both Jewish and Gentile men who were worldly men - not spiritual men.