code: private List<Double> knnDistances(S solution, L solutionList) {
      List<Double> listOfDistances = new ArrayList<>() ;
      for (int i = 0 ; i< solutionList.size(); i++) {
        double distanceBetweenSolutions = distance.getDistance(solution, solutionList.get(i)) ;
        if (distanceBetweenSolutions != 0) {
          listOfDistances.add(distanceBetweenSolutions) ;
        }
      }
  
      return listOfDistances ;
    }
docs: Computes the distance between a solution and the solutions of a list. Distances equal to 0 are ignored.
  @param solution
  @param solutionList
  @return A list with the distances