Outside of the minor in possession law. I do t think he really has much to worry about. Whomever gave him the gun and possibly who transported him there just may.
Minor in possession of dangerous weapons: 948.60. Refer to subsection (3)(c):
"This section applies only to a person under 18 years of age who possesses or is armed with a rifle or a shotgun if the person is in violation of s. 941.28 or is not in compliance with ss. 29.304 and 29.593."
941.28 deals with SBSs/SBRs, so we can agree that it does not apply, yes?
Section 29.304 deals with hunting. The title of the section is: "29.304 Restrictions on hunting and use of firearms by persons under 16 years of age." Given that this section a) deals with hunting, and b) involves persons under 16 years of age, can we also agree that it does not apply?
Section 29.593 deals with obtaining a hunting permit, and the firearm safety course required to obtain said permit: "29.593 Requirement for certificate of accomplishment to obtain hunting approval." The entire section describes the requirement for obtaining, or for applying to obtain, a hunting permit. Again, hunting is not a factor in this incident. Defending oneself does not require obtaining a hunting permit.
Nothing in either of these sections states or even implies that having a hunting permit is required for carry of a long gun, regardless of age, particularly for a 17 year old. (That assertion may change if we are talking about someone under 16 years of age.)