There is a difference.
「ようとする」means somebody tries to get something done, but yet halfway or failed.
only follows volitional form.
ドアを開けようとしたが、鍵が見つからない。 The door is not open.
「~ようにする」follows dic.form or ないform.
And it means somebody tries to do habitually something a bit hard cuz it does them good.
1. 健康のために、毎朝走るようにする。
or somebody does something, so that another thing happens(or not to happen)
2. カーテンを閉めて、室内が外から見えないようにした。
hope this helps.