You haven't given much information about your current situation, but I'm guessing that you're using CC. They removed the option to encode that format from CC because AE is not the best tool for the job. You should render a lossless (or nearly lossless) file from AE and use the Adobe Media Encoder to make your final, compressed video. (Or just send your AE comp to Adobe Media Encoder.)
You can restore the option to encode h.264 videos in AE in the preferences, but remember: they removed it for a reason.
- removed H.264, MPEG-2, and WMV formats from the default state of the After Effects render queue: In general, you should use Adobe Media Encoder to create output in these formats that have been deprecated from the After Effects render queue. If you need to be able to export these formats directly from After Effects, you can re-enable them by setting the preference Show Deprecated Formats In Output Module Settings in the Output preferences category.
- commands for sending composition to Adobe Media Encoder (AME) encoding queue: There are two new menu commands and a keyboard shortcut for sending the active composition or compositions selected in the Project panel to the Adobe Media Encoder encoding queue: Composition > Add To Adobe Media Encoder Queue, File > Export > Add To Adobe Media Encoder Queue, Ctrl+Alt+M (Windows), and Command+Option+M (Mac OS). While exploring Adobe Media Encoder, be sure to check out the new DNxHD import and export features, as well as the Match Source new features for automatically matching output settings to those of the source item.