Find the nearest coin to be collected in a game
object should be plural, and should more clearly indicate what it contains. gameObjects would be preferable.

It's a good idea to always include curly braces, even when they're not required. It removes a possible source of later bugs.

It’s easier to read isEmpty() than size() == 0. You also don’t need the else statement, since the if returns.

If handler.object is a type that has an iterator() method, it would be better to use that than a for loop.

The performance of LinkedList is often worse than ArrayList. You should consider testing their relative performances.

You should code to interfaces, not implementations, where possible. List&lt;GameObject&gt; objects = … is preferable to LinkedList&lt;GameObject&gt; objects =.

If ID has a correct implementation of equals(), you should probably be using that. == asks if it’s the ID is the same object, not just if it has the same value.

In java, it’s preferable to only capitalize the first letter of an acronym, so objectId is preferred to objectID.

There’s probably something wrong with getDistance() - it should either be an instance method or you shouldn’t need to pass in this.

You don’t need to loop twice. Every time you find an object with a matching id, compare it’s distance to the current nearest object. Only keep the nearest. This will also save you from computing the distance twice.

As far as optimizing performance, you'll have to do some testing and see if it's working fast enough for you. Cutting out the one loop will make it closer to optimal, but we can't know how that will interact with the game.

If you were to apply all my suggestions, your code might look something like:

public GameObject getNearest(final ID objectId) {
    GameObject nearestObject = null;
    int distance = Integer.MAX_VALUE;

    for (int i = 0; i &lt; this.handler.object.size(); i++) {
        final GameObject currentObject = this.handler.object.get(i);
        if (!currentObject.getId().equals(objectId)) {
            continue;
        }

        final int currentDistance = this.getDistance(this, currentObject);
        if (currentDistance &lt; distance) {
            nearestObject = currentObject;
            distance = currentDistance;
        }
    }

    return nearestObject;
}