The formula for calculating gravitational force between any two objects is givn by:
Here:
G = universal gravitational constant;
m1 = mass of first object
m2 = mass of second object
r = distance between two objects
Masses of objects is located in a numerator of a fraction. This means that increasing the mass of any (or both) object increases the value of a fraction. This leads to increase of right side. This means that as mass increases so does the gravitational force.
If the distance was increasing this would mean that the force decreases because distance is located in a denominator of a fraction.