This is another one of the few places in which Matthew preserves a memory of the historical Jesus' "Jew only" gospel. There are "woes" on Jews, too, of course. Many in Israel are called, but few even of them are chosen. There is no thought of calling Gentiles and Samaritans, only the lost sheep of the house of Israel. οὐαὶ τῷ κόσμῳ.
John is part of the post-crucifixion consensus whose hand thoroughly contaminates and dominates the record with Christianity as universal religion, open to all.
Woe unto the world because of offences! for it must needs be that offences come; but woe to that man by whom the offence cometh!
-- Matthew 18:7
And if any man hear my words, and believe not, I judge him not: for I came not to judge the world, but to save the world.
-- John 12:47