You have to be convicted of the crime before any sentence can be imposed. If, for the sake of argument, we assume that you get convicted, then the maximum sentence that the court can impose on a juvenile delinquency matter is a commitment to the Department of Youth Services (DYS) to age 18.
A DYS Commitment does NOT mean that you will be locked up at DYS from the date of your conviction until you are 18. A juvenile committed to DYS can expect to spend some time physically confined to a DYS facility (in your case, a conviction for misdemeanor A&B carries a program time of 3-5 months, plus the initial 30 day assessment period), after which time that juvenile is returned home on a Grant of Conditional Liberty (GCL). Think of a GCL like being out on parole. While out on a GCL, the juvenile is still under the control and supervision of DYS. He will have a case worker whom he reports to, much like a parole officer. If the juvenile violates his GCL, by committing a new crime or breaking some condition of the GCL like drug use or curfew violations or not meeting with his case worker, DYS can revoke the GCL and hold the juvenile in custody. Exactly how long depends on the nature of the violation.
The self-defense/defense of another defense does not allow you to use more force than is necessary to stave off the threat. For example, if someone is trying to punch you, you cannot shoot him and then run him over with your car. If the alleged victim suffered severe injury as a result of your actions, the argument will be made that you exceeded the bounds of defense of another by using too much force.
Keep in mind also that the alleged victim may exercise his 5th amendment right against self-incrimination (stemming from his fighting with the other party) and refuse to testify. If there are no other witnesses, then your chances of prevailing at trial increase significantly.
That being said, you are facing a serious charge and should not try to handle this yourself without a lawyer.
Best of luck,
If you are the one under 14, you will go to juvenile court for this offense to be charged. It is unlikely that you will be facing any time in a detention center IF your story is accurate and IF you don't have a juvenile record. If this is not your first time being arrested, you may have more obstacles. No matter what, you will need to be represented by an attorney, and if your family cannot afford one, the court will appoint one to represent you. The most important thing for you to do is to stay out of trouble and away from the person you hit.