In general, you cannot do a rollover of 401(k) assets into an IRA, whether Traditional or Roth, until after you have left the company (or possibly have turned 59.5 years of age while still being employed by the company).
The IRS says in its Resource Guide for 401(k) participants (last updated August 27, 2017) that
Generally, distributions of elective deferrals cannot be made until one of the following occurs:
- You die, become disabled, or otherwise have a severance from employment.
- The plan terminates and no successor defined contribution plan is established or maintained by the employer.
- You reach age 59½ or incur a financial hardship.
To my mind, "I want to roll over my 401(k) money into an IRA" does not qualify under any of these criteria but others obviously have a different opinion or have read the US Tax Code and are aware that this reason is an allowable exception to what the IRS states is the general rule.
Be that as it may, once you are eligible to do a rollover, be aware that any distributions from your 401(k) are automatically subject to the pro-rata rules, and you cannot just withdraw your after-tax contributions from the nonRoth part of your 401(k); each withdrawal will consist partly of taxable money and partly of nontaxable money.