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. How do I do this?
The Show Deprecated Formats In Output Module Settings is only available in After Effects CC. That option was removed in After Effects CC 2014.
Even before they removed the option (but especially now), here's what you should be doing: using Adobe Media Encoder to create H.264, MPEG-2, and WMV videos from After Effects
However, if you really want to encode h.264 directly out of AE (which is not recommended), you can choose to Save As CC in CC 2014 and open your projects in the older version and do it there.