The total time it takes to go between two points will change if you put a large mass in the way, since light travels on a curve and even though it moves at a constant speed along that curve, the total distance it has to travel increases.

Could a little confusion creep in here?

In the oft quoted analogy of a long journey on the curved surface of the Earth, the curved line is presented as the shortest distance in space.

However, the curve on which the light travels when a significant mass is close to its path is a geodesic, which, I believe, is defined as the shortest distance between two points in spacetime.

If the geodesic is the shortest distance in space, that must be because space is distorted, and there is no way to take a "short cut" by finding a Euclidean straight line. Difficult for the non-expert to visualise.

If the geodesic is the shortest distance in time, in what sense does the total travel distance increase?

Do we have to think in four dimensions to get our heads round that?