I think the 0% balance transfer, if you can qualify for one, is the best way to go. However, the 401k loan deserves some discussion, as it could be a good option if you can't get a 0% balance transfer.
The first thing to compare is what return rate you get on your 401k. I realize that most people's accounts are down right now, but you need to consider the whole term of the loan. This depends on your investment strategy. The normal rule of thumb is that the stock market returns about 10% per year over time. This year you may be down 10%, but next year you could be up 20%, or down another 5%, who knows? But lets assume a 10% return over a four year loan, which is the normal pay-back term on a credit card. So, by taking money out of your 401k, you are "paying" 10% per year in terms of forfeiting interest.
Now, if you are paying 18% on your credit card, by paying off your card, you would theoretically be saving a net 8% per year in interest,.. If your 401k return drops to 0%, you are saving 18% per year. If your 401k return grows to 20%, you are paying 2% more than you would have paid the credit card company.
In reality, this is an investment gamble. If you think your 401k will perform poorly over the next 4 years, you could save yourself a lot of money by doing this. If your 401k grows rapidly, you would be losing a lot of interest.
Another important note is that you will pay yourself interest on the loan that you take. Let's say that your loan rate is 8%. Although this money goes back into your 401k account, it reduces the net cash savings that you will see between your credit card payment and your 401k loan.
If my credit cards were at 18% or higher, I would consider doing this. But in general I agree that moving to a 0% balance transfer will probably get you the best return for your money IF you can manage to roll the debt to another 0% balance transfer before the grace period expires, or IF you can pay off the whole amount before teh grace period expires, or IF the card you are moving to will give you a lower interest rate once the grace period is over.