The "amount of matter" is an informal description of the mass. The force in question is called gravity.
The pull of gravity is affected by the amount of mass, and by the distance.
The mass of the objects and the distance between the objects.
The masses of the objects and the distance between them.
Not only in space - gravity is universal. The force of gravity is affected by the distance, and by the masses involved.
... distance.
their mass' and the distance between them...
The base word of distance is "distance." It refers to the amount of space between two points, objects, or locations.
The distance, and the amount of charge on each object.
Mass and distance
it decreases the gravitational force.
The 2 masses and the distance between them.
Gravity is affected by the masses of the objects, and the distance between them (really the distance between their centers). Greater mass increases the force of gravity. Greater distance decreases the force of gravity.