The short answer is that Title VII of the Civil Rights Act and the Civil Service Reform Act of 1978 both prohibit a federal employer from discriminating against applicants on the basis of age (note this only applies to workers over 40). There is an exception where they can prove that age is a "bona fide occupational qualification," but that certainly isn't apparent from the details in your post.
I would suggest contacting a local employment lawyer immediately to discuss this further.
The information provided in this Answer is offered for educational purposes only and should not be construed as legal advice or counseling. You should not rely on the information herein in assessing your legal rights, determining to take legal action, in any formal papers filed in a legal or administrative forum, or in any way whatsoever. Moreover, this Answer does not create an attorney-client relationship - only the formal, written agreement required by the State Bar of California can do that. You should always have a full consultation with a lawyer if you are contemplating any sort of legal action.