The first thing you need to do is remove the nest box for now. Then you need to decide if you want to keep the male as a pet, or give him up to breed. You can’t do both. If you want him to remain a pet, then separate him from the female and either get a new male for her or find her a new home. She is wild and needs a bird companion.
If you want to give up handling the male and want them to breed, then first you need to give the pair time to bond. This means no more interaction with him other than to put food and water in the cage and clean the cage. He needs to focus on the female. If you keep talking to him and trying to handle him, he will be confused between wanting to be handled and wanting to be a breeding bird.
Birds do not have “friends” – when they are young they generally live in a flock and when they are mature enough, they choose a mate and stay with the mate. Other birds will be viewed as rivals and chased away. Birds also do not need a nest or nest box except when they are breeding. Otherwise you end up with the situation you have – the nest box triggered hormonal behavior in the male, but because he is not bonded with the female, he sees her as a rival. He is territorial with the nest box and is protecting it by instinct, but since he isn’t bonded with the female, then he does not understand she should be allowed in the nest box.
After you remove the nest box, give them as much privacy as possible, but also watch for signs of bonding. First it may just be sitting on the same perch. Eventually they should start making contact – touching beaks and at some point they will groom one another. Once they finally do start to mate, then you can see about putting the nest box back up. Hopefully then, both birds will investigate it together and finally she may start to lay eggs.
It is possible that he is too tame to become a good breeding bird. If the two birds do not begin to spend time together – and give them several months at least – then he probably needs to be kept as a pet and as I said above, find a male or a new home for her.