Arguably a careful writer / speaker might reserve the infinitive form for when a human subject is involved in an intentional, teleological context:
“He would go a long way to help her” : “He would undertake a lot in order to help her”
“Daily exercise would go a long way to helping her lose weight” : “Daily exercise would contribute greatly to helping her lose weight”
---I doubt if such a distinction is respected by many nEs’s.
Cf. these two online examples; the perspective in the first, I would say, is intentionally teleological, but not in the second (whether the writer of the first actually intended that is another matter):
vor 5 Tagen - To him, his followers are his best friends and he would go a long way to ensure that he keeps them refreshed and entertained. You love football ...
26.12.2017 - If Lacazette can perform against the Eagles, getting on the scoresheet in the process, then he would go a long way to settling any fears ...
On this understanding, the sense in the OP would require the gerund.