List<Nota> list = new ArrayList<>(db.getGruppi().toList());
List<Nota> nl = list.stream()
.map(Nota::getGruppo)
.distinct()
.collect(Collectors.toList());
Certo, così dà errore. Il map(Nota::getGruppo) trasforma un Stream<Nota> in un Stream<String> (String del gruppo). Quindi alla fine ovviamente non puoi avere un List<Nota> !