Creating Specific Connections Instead of Nearest Points

okay thank you , i thought i can solve my problem with this method but no its not working. i posted other query here , can you check it please , im trying to acheive this soultion to that query . if would to take look and help it would be great