+0
I've learned that the verb "TRY" can be followed by a verb either in infinitive or gerund.

Here are the examples I have on my english book

"I tried to move the table, but it was too heavy so I couldn't move it"
"I didn't like the way the furniture was arranged, so I tried moving the table to the other side of the room"

I think I perfectly understand the differences between those two. In the first the effort is over (that's why it should be used the infinitive). In the second the effort is not over yet, that's why it should be used the gerund).

Now I'm taking additional exercises on a website and here's one of the questions:

  1. Try ____ there as fast as you can.
a. getting
b. to get
c. got
d. get

In my opinion, the right answer would be "getting" but the website told me it's "to get" because it should be done an effort.
But according what I've learned, during the effort we use gerunds.

Sounds contradictory.
+0
According to Practical English Usage (Michael Swan, OUP 2005), we use try + -ing to talk about making an experiment - doing something to see what will happen. To talk about making an effort to do something difficult, we can use either try + infinitive or try + -ing.

Let's look at your example 'Try pressing the green button'. There is no difficulty in doing the action, but we don't know for sure if it will have the desired outcome (i.e. making the photocopier work).
If we say 'Try to press the green button', it suggests that the action itself is difficult and requires effort.
Comments  
"to get" in your example would do better. When it's hard for a person to some extent to complete something, and s/he tries, but isn't sure about success, an infinitive is used.
Teachers: We supply a list of EFL job vacancies
Here are a few other examples my book mentions:
A: The photocopier doesn't seem to be working.
B: Try pressing the green button.
_________________________
A: I've got a terrible headache. I wish it would go.
B: Have you tried taking an aspirin?
__________________
"I rang the doorbell, but there was no answer. Then I tried knocking on the door, but there was still no answer".
*******
In all these examples, the effort hasn't finished yet. There are still chances to repair what they couldn't.
*******
Please, try to be quiet when you come home. Everyone will be asleep.
___
I was very tired. I tried to keep my eyes open, but I couldn't.
***************
While in the last two, the action seems to be a completed one and there's nothing you can do.
That's why In my exercise I chose "try getting" because there's still some effort to be done.
 calpurnia's reply was promoted to an answer.
ElidaIn the first the effort is over (that's why it should be used the infinitive). In the second the effort is not over yet, that's why it should be used the gerund).
No. When the effort is expended is not the difference. Read Calpurnia's answer carefully.

"Try doing this" should be used when you want to say, "Maybe this will be an effective way to do what you want to do", or "Maybe this will work".

-- This bottle won't open.
-- Try running hot water over it.

-- I have an upset stomach.
-- Try taking an antacid tablet.

-- The gravy isn't very thick.

-- Try adding some flour.

CJ
Site Hint: Check out our list of pronunciation videos.
Here are a few other examples my book mentions:

A: The photocopier doesn't seem to be working.
B: Try pressing the green button. It is EASY to press a button. It might fix the problem.

A: I've got a terrible headache. I wish it would go away.
B: Have you tried taking an aspirin? It is EASY to swallow an aspirin. It might fix the problem.

I rang the doorbell, but there was no answer.
Then I tried knocking on the door, but there was still no answer". It is EASY to knock on the door. Somebody might answer.

Please, try to be quiet when you come home. Everyone will be asleep.
It is NOT EASY to be quiet. You have to remember to walk very softly, whisper when you talk, close the doors slowly and carefully, and not turn on the TV.

I was very tired. I tried to keep my eyes open, but I couldn't. It is NOT EASY to keep your eyes open when you are very sleepy.
Thank you guys. I'm now able to tell the the real difference.