Algorithm for designing a binary code with predefined distance
This is known as an embedding into $\{0,1\}^n$.  Your matrix $A$ defines a weighted graph, and you want an embedding into the hypercube.

I suggest you examine the literature on low-distortion graph embeddings, which have been studied in great depth in the computer science literature.  You might find some existing constructions on this topic.  I'm not deeply familiar with that literature myself and I don't know whether you will find anything directly applicable.