Did Jesus come to bring peace or not?
Matthew 10:34; Luke 2:14; 22:36
and Mark 9:50; John 14:27; 16:33; Acts 10:36
Context is the key to Jesus' words. In Matthew 10:34, Jesus is speaking about the divisions that will come, even among family members, over their belief or lack of belief about Him. In that respect, He has come to bring division. This context is also related in Luke 12:51.
Luke 22:36 Jesus is preparing the disciples for His departure. He is telling them that they will need to provide for themselves and even protect themselves. Up to that time, everything they had needed had been provided. But, after the crucifixion and ascension, they would again be "on their own." They would need to work, provide for their families, and, if need be, protect their own; hence, the mention of the sword. Of course, the Bible teaches that Christians are to be peaceful, loving, and forgiving. But it also teaches that we are not required to sit idly by when persecuted unrighteously.
The rest of the "peace" verses, teach just that: peace.
Jesus did not contradict Himself. When we look at His words in context, we can see what He was saying and that there is no contradiction at all.