I do not believe a court appearance is necessary for a legal name change; this obviously depends on the state of residence. I see that the OP lists VA as home, and I changed my last name in VA a few years ago. All it took was a notarized statement from me stating the intended name change and I mailed that in to the county court. I then received an official copy of the court order signed by a judge a few weeks later.
That said, my advice would be to not change the name before R-Day. At this late date, with all the paperwork the army is preparing for you, wait until you have officially joined up (meaning signing those papers and raising that right hand on R-Day) before you do anything that will confuse the US Army. You do not want records screwed up from the very start! I sincerely doubt you’ll have time to handle this “during” Beast, so yes, let’s say after Beast! You could even prep the necessary paperwork now (when you seemingly have all the time in the world) and have it ready for yourself or a trusted friend/family member to mail out on a specified date. I don’t know your status in life and how much this would affect you, but just keep in mind it can be time consuming to then change your name on all financial and credit accounts, frequent flier accounts, etc. Hopefully you are young, carefree, and haven’t accumulated too much of this stuff yet!
Just my $.02, though you are a private citizen and can choose to handle this matter however you wish. Best of luck to you at USMA, whatever your name is!