IT jobs now a days are very very competitive and usually favors the young people.
Unless you have the motivation/ability to keep updating your knowledge , you are out…
In my company, we outsource the java development job to India as we can hire 3 engineers rather than having one in states. But again, hiring H1B is usually more costly than hiring a US Citizen.