ciao andbin!

in effetti avevo provato con Set, ma usando Nota e non String.
così come hai fatto tu funziona.
ho solo provato ad aggiungere il sorted, ma sembra non ordini come vorrei:
codice:
Set<String> gruppiDistinti = list.stream()
        .sorted(Comparator.comparing(Nota::getGruppo))
        .map(Nota::getGruppo)
        .collect(Collectors.toSet());

invece, per quanto riguarda List, ho fatto così:
codice:
List<Nota> list = new ArrayList<>(db.getGruppi().toList());
list.stream()
        .map(Nota::getGruppo)
        .distinct()
        .collect(Collectors.toList())
        .forEach(n -> {
            System.out.println(n);
        });
sembrerebbe funzionare!