Starting in version 15.1 of After Effects CC, the H.264 video codec is no longer an option for exporting in the QuickTime format. Luckily, we can still export in this popular video format with Adobe Media Encoder.
In After Effects, go to Composition → Add to Adobe Media Encoder Queue.
Adobe Media Encoder will launch and add your composition in the Queue. In the dropdown for Format, choose H.264.
Hit the green play button to render the Queue.