Stepping back from difficult people does not transform you. It protects you. Learning to love people the way that God calls us to seems to be so very impossible, especially when they are difficult. God wants to transform us from being fearful of being hurt, or fearful of doing the wrong thing, or fearful of being rejected and hurt again. He does this by telling us to proactively love difficult people. This does not mean "fixing" them. It means "loving" them.
This kind of love demands no return or reward or change from the person being loved. It loves them because real love comes from a heart of love and just loves. That is, it gives, embraces, encourages, sacrifices, with no pressure. The one loved is free to respond in any way they choose. The one who loves will hope for a return; but not a reciprocal return. It is the reward of seeing someone set free to be who God has intended them to be.
To love like this grows and transforms the one who loves. It is its own reward.