The question is who is the subject of your phrase.
If you refer to "a group", you ar referring to the group, "one group", so its pronoun are "it". If you are going to refer to "two groups" (the groups), "it", immediately turns into "they".
Your question has a trap. "A group of students" is not the subject.
If you do the question to the verb: "Who was walking on the road when a truck...", your answer would be "a group of students" but the real subjects of that phrase are the students who are forming a group, so, if you realize here: a group, a bunch, a lot, a few, all those are quantifiers (group = more than one), and, they are used like this:
quantifier + noun
The noun is students and never the quantifier.
If you would had used "a group" (without students) then the phrase would had stayed with "it" cause the group would had become the noun.
So, finally to answer your question, your example applies to the students as noun so they/them is correct.
If you don't use students and stay with just "a group", then is correct to use it/it.
The list (yeah, "a group of" is not there, but I think that is because its informality, just like "a bunch"):
Simple Quantifiers: all, another, any, both, each, either, enough, every, few, fewer, little, less, many, more, much, neither, no, several, some.
Complex Quantifiers: a few, a little, a lot of, lots of.
As @tchrist pointed out, human beings are never referred to as "it". They are normally referred back to using "they", even in those cases when the original antecedent is treated as a singular.
Examples: A team, a posse, a council, a fraternity, a silent majority, etc.