Yes, it is correct to say "I didn't have the chance to talk with him." This sentence is grammatically accurate and commonly used to express the idea that you were not able to speak with someone due to circumstances or opportunities that did not arise. It indicates that you wanted to talk with him but were unable to do so at the given time or situation.