Cannot charge Xperia Z3 Compact
Sounds like a loose connection and/or hardware issue. 

If you fiddle about with the cable in the port and the light comes on, it could indicate that the cable is potentially faulty, else, if it's only around three weeks old, can you not send it back and get a replacement under faulty/warranty terms?