Usually a dog is triggered to “protect” because they sense that there is danger. This is, if I am not mistaken, something that typically comes in to play as dogs mature. Your dog is still a puppy and wouldn’t be expected to protect a pack. As they get older you will likely see some change in this behavior.
I am sure that there is a way to train your dog to respond to specific triggers with specific behaviors, but I doubt you will be successful in getting them to differentiate between a knock in the middle of the night and a knock during the day. A knock is a knock.