QDRO-related 401(k) distribution and partial year residency

Hi there! I will be receiving a 401(k) distribution under a QDRO as a result of a divorce. I am planning to take it (or part of it) as a lump sum to enable me to purchase a new home. However, I am trying to determine the right timing to take the distribution. I currently live in a state without income tax and am likely moving to a state with income tax. If I receive the lump sum distribution before I move to the state with income tax, will the distribution be subject to state income tax? For example, if I receive the distribution in February 2024 while living in Nevada but then move to Maryland in July 2024, will the portion of my income I received as a distribution be taxed by Maryland? I have the opportunity to take the distribution prior to the end of 2023, but will then be ineligible for a first-time homebuyer program in 2024 as my income (as reflected on my 2023 return) will be too high, so I am trying to weigh my options. Thanks in advance for your consideration and help!