They only eat junk food. This implies that they eat nothing else. However, while speaking, we say 'only eat' to imply the same.
If you want to speak grammatical English the second answer is correct. The vast majority of voters are wrong here because adverbs such as only, almost, nearly, etc. always modify the word which immediately follows. For the first choice to be true one should say "They eat only junk food." It's not the most common, but it's grammatical. The other literally means that they do nothing to junk food other than eat it, as the second option says.