The answer is as complicated as the intersection of military justice, American military involvement in Vietnam, and the American public's (to include politicians') perceptions of the war.
I'll try to not to get too into the legalese of it, but forgive me if I do.
LT Calley was indeed the only person convicted in a court-martial. The military jury sentenced him to life in prison with hard labor for the premeditated murder of Vietnamese civilians. Almost immediately after the verdict, President Nixon commuted the sentence to house arrest. A few years later, a federal judge ordered LT Calley's release from house arrest because Congress refused to release the statements given to the House Armed Services Committee by witnesses who were to testify for the prosecution (a Jenks Act violation that means their testimony should not have been allowed at trial).
According to Warrant Officer Thompon's (the American helicopter pilot who saw the massacre and did his best to stop it and later report it) biographer, President Nixon and his allies on the House Armed Services Committee wanted to use a committee investigation to falsely show to the American people that "our boys don't do such bad things," in order to keep American public opinion from sliding even more against the war (the massacre happened during the Tet offensive and the allegations came to light after the offensive was over).
Many (around a dozen I think) soldiers were charged with either participating in the massacre or participating in the cover up, but everyone other than LT Calley was either acquitted (probably due to jury nullification with sentiments similar to Nixon's and his allies) or charges were dismissed prior to trial. When I say cover up, I mean a shoddy initial investigation into the incident and subordinates downplaying the casualties to superiors, to include the brigade commander's assessment to the division commander that only 20 civilians were killed when they were caught in a crossfire between Americans and VC (clearly not true). The initial investigation went something like an officer asked the soldiers as a group "hey did anyone witness any war crimes?" "No, ok, just checking thanks." (I'm simplifying.)
Lieutenant General Peers, a combat veteran of WWII, Korea, and Vietnam led an extensive investigation that is perhaps one of the best investigations into war crimes every completed. It is a fascinating read and I recommend reading as much as you can: https://www.loc.gov/rr/frd/Military_Law/Peers_inquiry.html If nothing else, read the summary in Chapter 2 of Volume I, that's where I'm getting most of my information. Peers does not hold back in his assessment of the brutality and the leadership failures at all levels. Two facts that jumped out to me, Calley told a soldier to "take care" of some civilians, when the soldier said "sir, I am, I'm watching them under guard so they can't do anything," Calley replied, "no I mean kill them." (I'm paraphrasing) And the pre-mission briefing by a company commander Captain Medina included instructions like "burn buildings and livestock to ensure the enemy cannot later use them." Normally when buildings were destroyed the livestock was moved and of course people inside (who were civilians) were moved too. Medina's order morphed into "burn the buildings with livestock and civilians still inside." (again paraphrasing)
But back to Nixon, public sentiment heavily favored LT Calley as Nixon received thousands of letters or telegrams a week calling for Calley's freedom. Needless to say Nixon did not want any bad news out of Vietnam, and an American officer accused of ordering the murder and rape of hundreds of civilians could not have been worse. Hell there was even a country song glorifying Calley, saying he was just following orders. Despite the sentence clemency, Calley's case made its way through military appeals and was upheld, and Calley remains a convicted murder.
The military prosecutor wrote a letter to President Nixon after Nixon granted Calley clemency that I think is also required reading on My Lai. Captain Daniel expresses his outrage so eloquently: https://blogs.baylor.edu/mylaimassacre/aubrey-daniel-letter/
My Lai is probably the low point of the U.S. Army in history, but people learn just as much (if not more) from failure than from successes. The massacre led to the establishment of the DoD Law of War manual and serious ethical and rules of engagement training for infantry soldiers.
"But it was so long ago," is the cry of skeptics of such atrocities or from those who don't want reminders, but to them I offer this analogy: much like vaccines can protect us from near-eradicated diseases, the need for the vaccine continues despite the disease's virtual elimination. History lessons like those from My Lai act as a vaccine to not just to the generation that was exposed to the virus, but as a vaccine for future generations to ensure the illness of similar moral failings does not infect others.
The first factor in lack of prosecution is that Officers with direct Command at Mai Lai had little interest in reporting it. Since there was no report of these events internally, it took until September 5th 1969 for the Army's Criminal Investigation Division to File Charges. By this time most infantrymen involved had been discharged. Toth v Quarles set precedent that once a person becomes a civilian they cannot be tried by Court Martial "No matter how intimate the connection...".
26 individuals connected to the Mai Lai massacre were charged. With only 3 facing trial. the only conviction was that of Lt. Calley which was achieved by testimony of an enlisted man in exchange for immunity from prosecution.
His conviction and sentencing was seen as a scapegoat for others responsible by the public and felt he faced too harsh a sentence. Within a week President Nixon had ordered him removed from the stockade and placed under house arrest.
The commanding officer Capt. Medina was found not guilty by court martial.
Col. Oran Henderson was found not guilty and issued a letter of Censure and reduction in rank
The Why then focuses on "Why did it take so long for charges to be filed, and why did chain of command cover this incident up" is not something I am adequately prepared to answer, but I hope the above was helpful in terms of understanding the mechanics of why so few people faced trial.