Line between 2 points with the shortest distance

Hello,
I have 2 lists with points and always want to connect the two points with a line that are the shortest distance from each other. How can I do that?
Frank

Dachtragwerk_Ohne Mittellinie.gh (59.8 KB)

Where?

The 2 lists of points are at the end.
grafik
I already tried to make the lines.

You can try something like this:

But, please…