I agree that it depends a great deal on what happened during the divorce proceedings and what, if anything, the court decided with respect to the § 401(k) account. The OP needs to provide some more information on that to get much in the way of helpful comments.
(By the way, it is not a 401k, 401K, or any of the other variations I have seen people use; it is properly written as 401(k) as it is IRC § 401(k) that provides the rules for these accounts.)

