Federal authorities have charged two New York City men with distributing over a million counterfeit pills in Western New York, some of which contained fentanyl.