There are special drug courts out there that addicts qualify for without violent offenses/strikes that are outside the regular DEJ and Prop 36 programs. But there is a type of probation for it generally. I agree with the advice already given that you need to talk to your lawyer and be clear on your obligations. Those courts offer a lot of help with getting you on your feet and into jobs programs if you are successful.
I am licensed to practice only in California and the 9th Circuit. This response is informational only and is based only on the general inquiry posted, which may differ from the advice that would be given if further facts were given, or if the inquiry implicates laws which are state specific. In addition, no response to any posted inquiry should be deemed to constitute legal advice, nor to constitute the existence of an attorney/client or other contractual or fiduciary relationship, inasmuch as legal advice can only be provided in circumstances in which the attorney is able to ask questions of the person seeking legal advice and to thus gather appropriate information to provide a more complete, or even a completely different, answer.
It seems fairly clear that there has been a miscommunication and that you may not have heard your lawyer correctly. Since you have been convicted of an offense, by plea or trial, there are only two basic options for the judge: 1. Deny probation and sentence you to time, probably local time even if this is a felony, or 2. Grant you probation (for 1,2,3,4,5 years depending on misdemeanor or felony offense) with terms and conditions, such as complete an outpatient drug program. Probation is the only way the court has to try to keep you in line and to see that you complete the drug program. I'm certainly not saying that your attorney was 'wrong,' but you do need to ask him again and make sure you understand his answer. Hope this helps.
Although I am an experienced CA criminal defense and appeals attorney, I can not 'guarantee' that my answer is entirely accurate, since I have not reviewed all of the factual circumstances of the case, nor have I discussed those circumstances fully with the questioner. The fact that I have answered this question does not establish an attorney client relationship between the questioner and my self or my office.