What is the difference between different types of GND
Though they all all contain "GND" they are not really mean the earth, we only have one earth, but can have many "GND"s. You can think GND as a common reference point of a local system.

From your "GND"s, the AGND, may represent the "analog ground", SGND may represent "signal ground", PGND may represent "power ground". For some reasons, such as safety, EMI, etc., we tend to split our system into many sub-systems. Every ground just is a reference point of the sub-systems.

If your device doesn't belong to a system, you can't connect your device to the ground of that system.