Error on translateing GameObject

The following code should move a cube along the z axis when “w” is pressed.

function Update () 
    {
    	if (Input.GetKeyDown ("w"))
    	{
    		GameObject.Transform.Translate(0,0,1);
    		Debug.Log("W");
    	}
    
    }

The game starts fine but when “w” is pressed I get

" NullReferenceException: Object reference not set to an instance of an object
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.String cacheKeyName, System.Type cacheKeyTypes, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory)
Boo.Lang.Runtime.RuntimeServices.GetDispatcher (System.Object target, System.Object args, System.String cacheKeyName, Boo.Lang.Runtime.DynamicDispatching.DispatcherFactory factory) "

Any ideas on what is going wrong?

Use a lowercase t on transform. Capital “Transform” refers to a type. Same goes with the ‘g’ for gameObject, but you don’t even need to use gameObject.transform, you can just use transform.

transform.Translate(0,0,1);