I agree with Anton – it is extremely helpful to read a wide variety of books and articles. In addition, it is helpful to write often in your target language, as you can learn how native speakers express their thoughts, rather than being fully intrenched in the formal/literary language. There are some other techniques – translating from your native language to your target language (while paying close attention to the patterns). You can practice these grammatical structures anywhere, at any time (when I wake up each morning, I challenge myself to say a Russian sentence with a difficult grammar structure – this helps the structure become more automatic).
Another thing is to simplify your sentences and type them into Google. Here is an example of an incorrect sentence:
"I have been writing since I had been a child."
I put this sentence into Google, and I get in bold letters "since I was a child." Then you can connect this fragment to "I have been writing", because "since" is a conjunction.
I hope this is helpful.