It doesn't autocomplete, because compiller doesn't know what class it is from your code. Collider can be any class and Editor will not automatically assume, that it is a class inheriting from Node. This is not a problem and not a cause of your issue. You need to debug it by printing - print if collision, print collider, print get_groups, print health, and so on.
Byt he way, if You want to help compiller assume what class are You referring to and help it autocomplete, You can use AS keyword :
var idk = groundcheck.getcollider() as RigidBody