For some reason, this code is getting errors. (Parsing, and Unexpected '}')

For some reason, the following code keeps getting errors. Any ideas on what I’m doing wrong?

using UnityEngine;
using System.Collections;
   
public class Navmesh : MonoBehaviour
{
		public Transform target;
		NavMeshAgent agent;


		void Start ()
		{
			NavMeshAgent = GetComponent<NavMeshAgent>();
		}



		void Update ()
		{
			agent.SetDestination(target.position)
		}
}

Change this

NavMeshAgent = GetComponent();

to this

NavMeshAgent agent = GetComponent();