In regard to any penalties charged by your 401k provider, that is a matter to discuss with them. However, from an immigration standpoint, retirement funds can be acceptable as long as the funds are documented, including each deposit and withdrawal. If this is through your employer, proof of employment may also be required.
You may personally invest your retirement funds into the EB-5 project. You will have to show the legal source of your funds that you invested into the retirement account.