Converting equatorial coordinates to Cartesian coordinates for extragalactic distances
I find this discussion of cosmological distances by David Hogg to be very useful in answering questions like this.  In Section 4 he says:

The line-of-sight comoving distance between two nearby events (ie, close in redshift or distance) is the distance which we would measure locally between the events today if those two points were locked into the Hubble flow. It is the correct distance measure for measuring aspects of large-scale structure imprinted on the Hubble flow, eg, distances between “walls.”

That would suggest to me that it’s the distance measure you want for your problem, but I encourage you to read further in that article to be sure.