Apparently it needs 10km walked and 2 candys.
Both are a minimum requirement.
You need to have walked at least 10km, and in doing so you need to have earned 2 candy. If either requirement are not met, also the third requirement of keeping them as your buddy then your choice of Umbreon/Espeon will fail.