This is why new home buyers should walk into a model home with a Realtor to represent their interests. Builder contracts do not favor the purchaser and most folks signing them do not understand the complexities of contracts on homes to-be-built. But the statute for construction fraud in Virginia requires the contractor to begin performance on the service agreement to avoid prosecution. If your check had been deposited and work was never done the builder would have a legal problem. In this case money never changed hands, there was no delivery of a home on a secured deposit so there is no entitlement to funds by the builder. If the permits were not obtained the contract could not require you to forfeit a deposit because it would be in conflict with Virginia criminal code(s).
Much will depend on the terms of the contract you signed. Was a delivery date of the home defined in the contract? Are they in breach of contract? You may want to speak with a Real Estate Attorney in the area, for further guidance.
It depends if you were under contract, if you wer eunder contract and just canceled teh check you are in the wrong. you would need to get a signed release first. If you were not under contract yet, if the agreements had not been signed then maybe you are all set. You may need to seek a lawyers advice as to the legal raminfications of this.