It would be better to say:
She did not have to walk far ...
'have to' is used like any other verb -
'had to' for positive past simple, and 'did not have to' for negative past simple.
Your sentence would be understood, but it is a bit like saying:
'She walked not far.' Rather than, 'She didn't walk far.'