Heterogeneous populations in a network model of collective motion