Fuzzy answer to a fuzzy question.
This question seems to arise from a myth or misconception about what chords and chord progressions "are" i.e. what they do. Chords are building blocks for providing and altering the harmonic context, which exists in the listener's head and is basically a set of expectations against which incoming pitches are evaluated. Play Em9 - Ebm9 - Dm9 - Db13 - C13. Works great, but good luck trying to construct a metric function of the form Distance(Chord1, Chord2) that outputs a single number and that would give good "fitness" numbers for any pair of consecutive chords in that progression. The harmonic context is a black box in your head, you feed sound into it, and it changes all the time. Even if sound stops, the harmonic context keeps on changing anyway as time goes on. Or take something as simple as C - F - Fm - C. Do you want your function to say that the combination F - Fm works well ... always? Or only in specific situations?
The myth or misconception is that a chord is a harmonic context in and of itself. Or that "key + chord" is the context. Or that it's a universal biological mechanism without cultural and individual variation.
A good chord progression moves away from "home", creating some kind of tension, which can be released or left unreleased. Or maybe the next chord tells "it was just an illusion and this the real reality". What kind of a function could say, with a single number, how much is exactly the right amount of tension for some purpose.
I think the thing you're looking for is, how the harmonic context works, and how it can be manipulated in a controlled way. You need to develop some kind of a model of it. Things like the tonic - are we home now, and if not, where would home be? What notes could I play now and how would they make me feel about things? If I play note X now, how will it affect the set of notes I could play to do Z? It's not a single-dimensional thing.
Like David Bowling says, one way to construct chord progressions is voice leading. Take one of the sounding notes and move it a step to some direction, then fill in the rest with notes that accomplish what you want to do to the harmonic context. Do you want to move closer to home? Further away from home? Lean more on the subdominant or dominant side? Move over to the relative minor/major? Or do you want to make it more or less ambiguous to know where we are?
The only general advice I can give is, learn to play songs by ear as "chords and melody". Do modifications to the songs' chords and melodies, and learn how it changes the set of possibilities.