Isn't that a real gotcha. It's so easy to misread the Bible, to forget to consider the context before putting forward some great pearl of wisdom :)
I was so pleased a while back when a young man who was attending to the sound system at church, remarked on a persons treatment of Matthew 18:20. They had made the common mistake of thinking of Matthew 18:20 as a definition of church. It had really irked him that they took made such a basic error.
Lest you think I am a little harsh about someone being mistaken about a passage of Scripture, let me just say I myself had made that very same mistake about Matt 18:20, and held it until corrected some 3 years later. I am thankful indeed to the person who pointed it out. It maybe of course that I am therefore particularly sensitive when this passage is interpreted incorrectly and that may be so, but it can still stand as a helpful warning to deal carefully with God's Word as read it.
What the passage is speaking about is that of a brother sinning against you and refusing to repent, first in the personal one on one intervention, and then if he refuses to listen to you and two others, or even the "church" as the NIV puts it. Mt 18:17.
First of all, this word church is 'ekklesia' for which we later on derived the word church but it's basic meaning here is 'called out ones', used by the Greeks for an assembly or body of citizens gathered to discuss the affairs of state. At this point in the New Testament the Church in our common sense of Ephesians 3 which was a mystery in past ages, is not explicit, rather in the Gospels it is a gathered assembly around our Lord Jesus as his disciples. We must refrain from reading back into the Gospels what is later found in the epistles unless we have good warrant to do so.
This is why as Christians now, we take the epistles as our guide for what Church is and how it is to be ordered. What is the failure here is to take the Gospels seriously on their own account, failing to see what the Lord is teaching us through the Gospels. But more on that another time.
The second thing here is that Jesus is saying that he "Jesus will be with them" 18:20. Apart from the worthwhile inquiry as to Jesus association of himself and the reference about the Father in verse 19, what is primary here is that Jesus is saying that in context of judgment of a sinning brother he is involved! As Carson points out the "about anything" in verse 19 is better taken as "about any judicial matter" which fits with the argument of Matt 18. Then the point being made is that Jesus will be with the Judges who are here acting in the community of believers to deal properly with those that sin and refuse to repent.