Quantities of products are not increased by transportation. Nor, with
a few exceptions, is the possible alteration of their natural
qualities, brought about by transportation, an intentional useful
effect; it is rather an unavoidable evil. But the use-value of things
is materialised only in their consumption, and their consumption may
necessitate a change of location of these things, hence may require an
additional process of production, in the transport industry. The
productive capital invested in this industry imparts value to the
transported products, partly by transferring value from the means of
transportation, partly by adding value through the labour performed in
transport. This last-named increment of value consists, as it does in
all capitalist production, of a replacement of wages and of
Source: Capital Volume II, Chapter 6: The Costs of Circulation,
I. Genuine Costs of Circulation, III. Costs of Transportation
My understanding of Marx's argument is the following: Transportation does not alter the quantity/quality of products significantly. But, products need to have a use-value in order to also have an exchange value. Thus, an orange for example produced in Spain has an exchange value in UK, only if it arrives in UK, so that it can be bought and consumed. So, transportation adds value to the products, and this is done (as with all products) partly from the labor value (transportation workers) and partly from the means of production (means of transportation: airplanes, ships, cars, trucks...).
Since transportation adds value to the product, and since price is a mirror of value according to Marx, then we can say that transportation tends to increase the price of the product (which is a logical assumption on average).
Regarding distance, I am not sure if that is explicitly mentioned, but again we can deduce from the previous that: bigger distance --> more transportation needed (given constant technological advancement in a period) --> more transportation labor needed + more transportation means of production --> more added value --> tendency for bigger price.