Any time you are treated differently than someone else for whatever reason there is discrimination, i.e. the act of making or perceiving a difference. For example, choosing to hire an applicant with a 4 year college degree over one with a two year college degree is treating the more educated applicant differently than the lesser educated applicant and thus is discrimination in favor of the more educated applicant. Doing that is, of course, perfectly legal. Indeed most discrimination by an employer is legal.
It is only illegal discrimination if the reason for treating you differently is one that the law prohibits. Under federal law if an employer has at least 15 employees it is illegal for the employer to discriminate against an employee because of the employee's race, color, national origin, citizenship (though of course the employee must have the right to work in the US), religion, sex, age (if the employee is age 40 or older), disability, or genetic test information. So if the reason the employer made you do the drug test but not others was one of those reasons then the employer violated federal law if it has at least 15 employees. You did not say what reason the employer had for singling you out for the test so there is no way I can determine whether the employer violated the federal laws on illegal discrimination.
Many states have their own laws on illegal discrimination that apply to smaller employers than federal law does and/or covers more categories than federal law does. Since you did not mention the state I cannot tell you what your state's law provides. Also, some states/localities regulate how employers can do drug testing for employees, but again I can't give you any information on that because you did not provide the state/locality where you work.