Jesus never said, "You get what you deserve."
You get what you deserve. People say it in a variety of ways. Sometimes it is called "karma", formally the Hindu belief that your behavior in this life affects where you land in the next life, but more popularly understood as payback. Sometimes it is called "logical consequences", the idea that our actions make a difference. However we say it, we like to think that people get what we deserve.
Sometimes we say, "you get what you deserve" out of a desire to be helpful. We warn to remind one another that what we do matters, that the seeds we sow will bear a crop we must harvest, that we are responsible for our own choices. Sometimes, when we say, "you get what you deserve", we are encouraging people to take responsibility for their lives.
Sometimes when we say, "You get what you deserve", we are more vengeful than helpful. We are passing judgment on others. We are blaming people for their struggles. Sometimes we say it as a curse.
Whenever we might say it, and however we might mean it, Jesus never said, "You get what you deserve." That issue wasn't his concern. He didn't seem to be worried about whether you got what was coming, whether that might be good or bad. He was more interested in you turning back to God, and making the most of the time on this earth that God gave you. He didn't care about what you deserved. He suffered, on your behalf, what you deserved.