It's not so much the dog doesn't listen, more that he doesn't understand what you want him to do. Go back to basics and don't punish him when he toilets indoors. Double your vigilance and take every opportunity to put him outside to toilet. The crucial thing is to be present when he does toilet in the correct place, so that you can reward him. This makes him keener to repeat the performance to get another treat. Conversely, if you have been telling him off for indoor accidents he may already feel inhibited about going to the toilet in your presence, including when he goes outdoors. This is one reason why it's important not to punish for inappropriate toileting.
While indoor elimination solutions like potty pads and litter boxes have their place, using them can actually slow the process down if you plan to eventually have your dog eliminate exclusively outside. Teaching your puppy to potty inside sometimes and outside others can be confusing because you will eventually have to teach your dog that at some point the indoor option is no longer allowed. Potty pads work best for people who can’t get their puppy outside quickly, like those who live in high-rise apartments or have limited mobility.
Consistency is crucial. This may mean taking time off work to be there to take the pup outside every 20-30 minutes when they are awake. Crate training will also help the 'penny drop' as it teaches the pup to hold on until taken outside. Then, be sure to stay with the pup in the yard so you are there to reinforce how clever they are when they do go in the right place.