You're asking the wrong question. The question a future employer will ask is not "when" but "why".
The simplest solution here is to have an open conversation with your company. They clearly invested this money in you. They're expecting something back in return. At the same time, you have your own needs to fulfil, and (by definition of the fact you're planning to quit), the company is not able to fulfil them currently.
The important thing to remember, as Jonathan Reed points out, is that you have the control here. Unless they have contractually defined conditions (e.g. if you leave within 6 months, you have to repay), you have the choice whether to leave or not. As long as you and the company can communicate in fair terms about your needs, that should be enough to solve any major issues of resentment.
This is negotiating 101: Why do you want to move out of state? If it's for better pay, they may be able to match this. Can you work remotely, thus still providing them your value but fulfilling their needs? Is this a relationship thing, in which case they may be able to give you more flexible working periods?
If they can't or won't meet your needs, then you are justified in choosing an employer who will, if you can. And again, as long as you're clear with them, work to agree a fair notice period, etc, no legitimate business should have an issue with this.
In terms of a reference, if I had a good candidate, but an oddly damaging reference, I would want to talk to the candidate about why this reference was so off from my experience, which you should be able to explain clearly. At worst, your new employer might be more careful about the training you receive, and ensure that it is in their best interest and doesn't disrupt your valuable work.
At the end of the day, your ethical role is to be aware of your value to the company, aware of your own career/life needs, and to be open and honest to the company about what they can expect of the former given the latter. If they need something from you, they should let you know in the same way.