sentence1: Try using margarine instead of butter.
sentence:2Try not using margarine instead of butter.
Both sentences are correct; so are others:
Try using margarine - Use margarine, and see if it works. Try to use margarine - See if it is possible for you to use margarine; make the attempt.
Try not using margarine - Do not use margarine, and see if this works. Don't try using margarine - Do not use margarine; it will not work. Try not to use margarine - Do your best to avoid using margarine. Don't try to use margarine - Do not make the attempt.
Context is important. Please provide enough for us to be able to deal effectively with your question.
Your thread title should include all or part of the word/phrase being discussed.
If you just want to know the meaning of a word, try OneLook Dictionary Search first.