When dealing with a custody issue, the courts always make every decision based on what is in the best interest of the child. Typically, it is in the child's best interest to have both parents in his/her life. However, if one or both of the parents are not deemed to be "fit" they could be removed of their possessory rights.
In your situation, the court will not look favorably on your job as an escort. But your ex doesn't have it much better considering that he is a drug addict. You are making the right move by enrolling in college. You should also try to change jobs. Do anything you can to prove to the court that you are not a threat to your child and that it is in your son's best interest to be with you.
As far as your ex, if he is using drugs (or has recently), when you go to court for the SAPCR (acronym for Suit Affecting Parent-Child Relationship) suit, you need to inform the judge that your ex abuses drugs. Request a drug test, but know that you may have to pay for it. Keep in mind that you will more than likely have to take the test as well. If your ex fails the test, he will have a tough time getting sole custody. Also, since your son has been with you for four years, without cause, the court will not award your ex with sole custody.
When dealing with custody issues, you need to get a lawyer. This is a serious matter that will have profound effects on the rest of your life. Best of luck.
I agree with Dana Joseph Stewart's answer, and only wish to re-emphasize his closing advice:
GET A LAWYER who's experienced in family law matters.
You may be viewing this, naturally enough, through the lens of how it's likely to affect you versus your ex, and how it's likely to affect you financially. The family court judges, by contrast, have as their overwhelming concern "the best interests of the child." If you are employed in something that is marginally legal (if that), showing up with a plan to enroll in college is going to look like a last-minute attempt to dress up a serious problem. Your guesses as to what may happen are very likely to be wrong. And the consequences may include BOTH you and your ex losing custody of your son.
Trying to represent yourself in this situation is a prescription for disaster.
Sign up to receive a 3-part series of useful information and advice about child custody law.