If what you are writing is accurate-- you could very well have an actionable claim under the Age Discrimination in Employment Act (ADEA) which prohibits discrimination in job decisions based on age. You may also have a claim under State law if your State has a counter-part in the law. There are many factors that will determine if you would have a successful claim-- which would include a strict comparison between you, the other candidate and the qualifications for the job. You should consult an employment attorney in your area. You can probably call the State Bar or local Bar Association to find references for attorneys that primarily practice in employment law. You will have to file an EEOC claim before you move forward with any lawsuit-- you can do that on your own at your local EEOC office (eeoc.gov to find the local office)-- however, it is advisable to talk with an attorney before going to the EEOC.
Good luck, and sorry to hear about your situation.