Social Security and Medicare are funded by payroll taxes. Medicaid and military budget funded from Federal income tax.
If you cut military budget 100%, you will save ~900 billions (or whatever the right number is) a year. If, on the other hand, you cut Social Security or Medicare, the savings are 0, because you will have to cut their funding as well. Surely, no one will pay Medicare taxes, if there is no Medicare exist, right?