@MaheshG95462175 Please confirm the following.

var gr = new GlideRecord('u_environment_groups');
if(!gr.get(groupId))

Since the table name starts with u_ I am assuming this is a custom table, assuming group is a field defined on this custom table. In order to get the description you are calling .get method and passing groupID as a parameter. If you call .get method with one parameter, the GlideRecord assumes it needs to search for the record in sys_id column. Since you are trying to search in the group column you should use .get slightly differently.

var gr = new GlideRecord('u_environment_groups');
if(!gr.get('u_group',groupId)) //Assuming the column which holds group is u_group.

 

Please make this change and see if the query returns any result. Also, in order to debug, use gs.info() across different lines in your script include to check if the query returns any result or not.