I'm trying to build an inverter circuit in LTspice using voltage controlled switches
First, your diode \$D_1\$ seems to be short circuited (double check its connection). 

Second, as @Spehro mentioned,make sure that the voltage supplies are complementary to each other. A ways of reducing the risk of running into such problem is by parameterizing the signal sources.

Here is a small simulation you might find useful. It creates two signal sources with a phase difference equal to 180°.