I tried to create a new public function getGroupName() , so that I can call it on my template like so $Member.GroupName
Well that function would have to be on the Member class (or a decorated instance of a member). One thing you would have to consider is that members has multiple groups so you would be dealing with a set rather than 1 group instance.
In the template you could try
<% control Member.Groups %>
<% end_control %>