Selling drugs will most likely prevent you from becoming a police officer. Even if you were hired it would most likely not be for many years. This is one of those offenses that, whether committed as a juvenile or an adult, will be very hard to overlook when deciding to hire someone. The general rule that I try to tell applicants is if you have committed a felony at some point in your life, it will cause the most problems for you when going through the hiring process. The reason being, if you have committed a felony, in most states that will prevent you from being able to apply for a firearm.
However, each department is different. Some things may DQ from one department but not from another. The best bet is to just call ahead of time and ask if that will DQ you. Although you can still be hired after being DQ from another police department it will not look good to rack up a bunch of DQ's.