Interesting question and it great to see you are thinking about the future and trajectory of different professional domains. I am a AI researcher working in the financial technology space and on natural language problems. I work on several problems that have analogous applications to law.
The short answer to your question is NO, the legal profession will not be replaced by AI.
Here's the longer answer as to why.
First and fire most, the legal space requires a high amount of human touch. Whether it is litigation, negotiation, contracts, public defense / prosecution, or any other legal activity; legal actions are taken, made by and onbehalf of, and witnessed by humans. You will always a humans in the court room, whether it's the lawyers making or defending a case, the jurors in the stand, and the judge. Same applies to most other legal activities.
So where is AI being utilized in the legal space? AI is primarily used to help much of the tedious work around preliminary research, evidence gathering, document validation and review, and automation of paper processes. The common denominator for all these area is that most of the work is routine and formulaic which makes them easy to automate with AI.
That being said there is a real impact. Much of this work is often done by paralegals and junior associates or other administrators. It's still early, but it is possible to the automation of this rote work may lead to firms hiring less of those employees or eliminating existing jobs. But the reality is that there is a significant of work that requires creativity, critical thinking, and other skills that AI can't currently automate and really isn't close to automating. The automation of this low level and tedious work tends to open up those resources to work on harder problems that also provide value to the organization.
So the TLDR: AI isn't replacing lawyers. Go forth and pursue a law career if its your passion!