Answer :

Distance is the most important factor. Although the masses of the two objects are important, the product of their masses is then divided by the square of the distance between them.
AL2006

The strength of the gravitational forces between two objects depends on
the masses of both objects and on the distance between their centers.

I don't think you can say that one or the other is the "main" influence.

-- If each mass is multiplied by ' k ', then the forces between them are
multiplied by ' k² '. 

-- And if the distance between them is multiplied by ' k ', then the forces
between them are divided by ' k² '. 

Seems pretty equal to me.