How can i change a button text from "Button" to example "Button1" ?

In the Hierarchy i have a Canvas under it a Button and under the Button a Text.
In the script i did:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class NodesGenerator : MonoBehaviour {

    public Button btn;

    private void Start()
        btn.GetComponent<Text>().text = "Button1";

But getting null exception on this line:

btn.GetComponent<Text>().text = "Button1";

I dragged the button to the script in the inspector it’s not the button that is null.

The Text is a Child of the Button object. Try

btn.GetComponentInChildren<Text>().text = "Button1";