Unity error: CS1513: } expected

public class DestroyGameObject : MonoBehaviour
{
private object l;

    // Start is called before the first frame update
    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
      if (Input.GetMouseButtonDown(0))
      {
            RaycastHit hit;
            Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);

            if (Physics.Raycast(ray, out hit))
            {
                BoxCollider bc = hit.collider as BoxCollider;
                if (bc) l = null;) 
                { 
                    Destroy(bc.gameObject);
                }
            }
      }  
    }
}

its a syntax error

if (bc && l != null)

I THINK you meant the following…

                 if (bc ! = null) 
                 { 
                     Destroy(bc.gameObject);
                 }

You cant use ; inside of an if statement. Also it looks like you meant to use the ! symbol instead of the number 1.