John could have told the tax collectors to stop collecting taxes, but he didn't. It implies that the only wrong they were doing was collecting more than they were authorized to, not the collection of taxes itself.
Jesus also didn't tell tax collectors to stop what they were doing. He did call one of them to be His disciple, Matthew, and perhaps he left his job. Another tax collector, Zacchaeus, repented of taking more than he should have, but it doesn't say that he left his line of work.