I only have federal student loans, so I didn't know about the state loans.
You can stop contributing to the 401k at the next enrollment cycle. Depending on the plan, that could be monthly, quarterly, or yearly. Ask HR when the next time you can disenroll is. You don't need to leave the company to change your enrollment for FUTURE contributions. You just can't get to whatever's in the account NOW. And seriously, you ARE going to need that money when you retire, so try to think of the big picture.
I used to work for a Medicare supplement insurance policy. As part of our training, we learned that the average 65-year-old is expected to live about 15 years more. The general life expectancy may be 70-75, but that includes infant mortality, people who die from cancer or car accidents in their 20s or 30s or 40s, etc. If you make it to retirement age, the odds are on your side that you will make it a fair bit longer. Social security barely supports people now, and it might not even still exist by the time people in their 20s and 30s now, retire. I know you are worried about your credit rating, which is understandable, but money in your 401k is otherwise untouchable by creditors - it is protected from lawsuits and other means of collection, EVEN for student loans. It's a safety net you can maintain even if you end up in bankruptcy.