Answer: Let’s take up the passages you asked about one at a time. In Matthew 10:34-36, Jesus is referring to the sword metaphorically (the Bible uses many metaphors, as you know). The reason scholars can come to this conclusion is that Jesus later rebuked those who tried to take up the sword to defend him in the Garden of Gethsemane (Matthew 25:52).
Central to the message and life of Jesus was loving your enemies, not killing them or even getting even with them (Matthew 5:44). So why did Jesus use the metaphor of a sword in this context? The sword is symbolic of God’s divine judgment (Psalm 7:12). Here, Jesus uses it as a metaphor of separation between those who believe and those who don’t, even if believers and unbelievers are in the same family.
We know that some who follow Christ are hated by their family members. We also know that throughout the centuries, millions have been killed for believing in Jesus. That’s what Jesus means when he says He did not come to bring peace, but a sword. The cost of believing in Jesus can be very great. But the love of Jesus must be greater than the love of a family member.
The same comments can be made for Luke 12:49-53. Jesus knew that some would accept His message, and some would reject it. In this way his ministry would be like a fire. In the Bible, fire is also a metaphor for judgment and purification. Jesus did come to bring peace, not as the world gives, but “peace of mind and heart” (John 14:27).