This is indeed the passage, but the citing the desired goal has absolutely nothing to do with following, or not following, the steps of the procedure.
...but a fact is that sometimes these matters are not black and white and can certainly be more complicated than they might appear on the surface.
Which is why former Protestants like me maintain Sola Scriptura is untenable.
Perhaps one person's view of what happened is the polar opposite of the other one's.
The person's POV is not the issue: whether or not they will repent, is.
but this reporting is in order to bring the whole congregation to lovingly pursue his reconciliation, paralleling the lost sheep parable, and again, not as judgment and not as punishment.
Does "let him be unto thee as an heathen man and a publican" sound like "lovingly pursue reconciliation" to you?
Sorry, the goal is everything. And that, my friend, is restoring the lost sheep to fellowship. If it is just procedure and punishment that you are after, consider the words of a wise one, Mr. Bumble, “the law is an ass.”