When I was younger (A long time ago!) I used to back away, particularly early in my innings. I took advice from a couple of far better batsmen than myself, and am happy to pass their ideas on here. This helped me a lot, but it is true that you really do have to be brave at first, force yourself to overcome the reflex movement and build confidence.
I backed away from anything short around leg-stump. The advice was to take a leg-stump guard, and make a very deliberate trigger step across with my right foot, as the bowler hit his delivery stride. This put me on or around middle as the ball left the hand, inside the line of a potential delivery on leg-stump. It took some practice, but after a while I got used to it and it was effective.
The second piece of advice was to bat out of my crease, anything from 6 inches to 18 inches, as the feeling took me. Rather than just focus on getting myself inside the line, they told me to also focus on breaking up the bowler's rhythm, so that he found it harder to target my weakness. If I could put away a few bad balls, my confidence would grow and my footwork and timing would begin to take over instinctively.
I'm older and wiser now, and the problem has faded away. I still can't pull very well, but I can stay inside the line and turn the ball through backward square pretty comfortably.
Best of luck Alex!