Oh! My bad. I realised what I was doing wrong. For a relation to show up in the group by list for a kanban it needs to be added as a relation in the relation tab first by clicking “+ Add relation”:
I thinking maybe it could be possible to add an “+ Add relation” option in the group by menu too for silly people like me who didn’t realise you need to add your relation to the list in the relations tab before it’ll show up in the group by list:

