Paying for Personal college with 401k

Am an international student who got internships in US and am in final year of college.
Realized I can withdraw 401k (which I’ve been contributing to in my internships) without penalty.
[https://www.investopedia.com/ask/answers/102714/can-savings-roth-401k-be-used-college-without-penalty.asp#:~:text=Key%20Takeaways,loans%20and%20interest%20do%20not](https://www.investopedia.com/ask/answers/102714/can-savings-roth-401k-be-used-college-without-penalty.asp#:~:text=Key%20Takeaways,loans%20and%20interest%20do%20not).

I haven’t been maxing my 401k for internships, but now realize that if I don’t pay taxes on the contributions and use that to pay for school, it actually makes a lot of sense.

How do I go about it? Do I qualify even if my 401k is just opened less than one year. Thanks!