Group group= null;
_siteId = SPContext.Current.Site.ID;
using (SPSite site = new SPSite(_siteId))
{
TaxonomySession taxonomySession = new TaxonomySession((SPSite)site);
if (taxonomySession.TermStores.Count != 0)
{
TermStore termStore = taxonomySession.TermStores[0]; //default term store
group = termStore.Groups["group name"];
}
}Code snippet for getting the term group using server side object model
