If you multiply it by a constant, the gradient computation will include that constant. If you have f(x) and you multiply it by 2, ie, 2 * f(x), differentiating wrt x gives 2 * f'(x). It’s the same thing here.
If you weight the distances accordingly, then sum them together, the distance with the largest weight will (probably) contribute the most to the gradient, depending on how the rest of your functions look.