Rigidbody.AddForce not being detected

When I am inputting lines to add a force in both 2d and 3d, addforce is said not to exist in the directories and when it comes to running. I keep getting the CS0120 Error. I reinstalled the program with hopes of it being just a glitch in the installation but it still appears to be missing.
Edit:

   void Update () {
    	if(Input.GetKey(KeyCode.D)){
    		Rigidbody2D.AddForce (Vector2.right);
    	}
}

I just tried it with a basic line added the component to a sprite to see if it would work but for some reason it just doesn’t

Rigidbody is the class. You want the instance of the class. And Capitalisation matters:
AddForce not addforce.

GetComponent<Rigidbody2D>().AddForce (Vector2.right);

Well addforce won’t be found because it’s AddForce- case sensitive. Also, you don’t seem to be giving a value to the amount. Have you tried

Rigidbody2D.AddForce (Vector2.right * someVar);

?