I would suggest that you do not want to be a commercial pilot with AS - long periods sitting is not going to help with the condition or the pain and maximum strength pain relief is not compatible with aviation. Thankfully, I don’t have first hand experience to know how accurately it can be predicted or diagnosed, but my (unqualified) advice would be to get a much better understanding of your likelihood of suffering AS during your career AND to get an appropriate medical before you invest any time/money on professional pilot training. Good luck!