Your immediate family is typically the group of people in your family that is closest to you in blood and relations, such as children, siblings, parents and grandparents, along with their spouses. For your great grandparents, considering them immediate or not lies in your relationship with them.
According to the United States Office of Personnel Management, great grandparents are not typically considered immediate family because they are not your closest relatives. However, if you have a close enough relationship with your great grandparents, the Office of Personnel Management would consider them immediate family. So, even if not by general definition, if you have a strong bond with your great grandparents, you can consider them immediate family by the federal government's standards.