You can activate 'deprecated File Formats' in earlier versions of After Effects in your user options. The H.264 Codec and MP4 Container are not natively supported by newer After Effects versions. However, in your Render Queue's Output Format Settings, you can use the .mov Container with the H.264 Codec.