Dear @RishIt12,
Welcome to the Wefugees Community and thank you for reaching out to us.
I assume that you are holding a residence permit according to section 16a of the German Residence Act for completing vocational training ("Ausbildung")?
Unfortunately, I am not very experienced with study and vocational training topics, but I remember that we discussed a similar issue in this thread. Apparently it is not an easy question, whether it is possible to change from section 16a to section 16b while staying in Germany. In the mentioned post my colleague @mbeon-Éanna was referring to this brochure which states that the switch is possible. My colleague @mbeon-Christine, however, was looking at the Berlin procedural notes for the application of the residence law and found a contrary information.
I think it will be the best to contact the immigration office (Ausländerbehörde) directly in order to receive reliable and tailored information on your situation.
Maybe my colleagues or other members of the community have some more information and can help out as well.
In any case, please don't hesitate to get back to us with any further questions.
All the best,
Meike