If it's actually your 401k, sure you can. Just today I rebalanced my retirement funds away from large cap stocks to avoid this steaming turd that Elon is dumping on the public.
For what it's worth, I think anything selling energy or fertilizer which is not sourced from the Middle East is a pretty good bet right now. Depends on how the US/Iran conflict plays out, of course, but I'm not optimistic.
Away from large cap stocks to what?