I was wrong about Healthkit not exporting distance data. The data are there with distance in a cycling workout recorded as km between records, which are 1 or 2 seconds apart. The numbers are there, obscured by being of the order of 0.007 km. Solved at https://www.jeremycherfas.net/blog/transport-summary-q3-2023