My opponent has 3 x Arbor Elf in play. I cast Detention Sphere during my main phase and it resolves. Detention Sphere enters the battlefield and I target one of the Arbor Elves. My opponent responds by casting Lightning Bolt and targets the Arbor Elf that I target. Does the Lightning Bolt resolve killing the Arbor Elf, leaving me with no target for my Detention Sphere as it enters and the other 2 Arbor Elves intact?
If Lightning Bolt resolves and deals damage to the target, the target will die due to the damage soon after (C.R. 117.3b, 117.5, 704.5f). If the target of Detention Sphere's enters-the-battlefield ability becomes illegal (e.g., because it has left the battlefield this way), it will fail to resolve so that neither that target nor any other "permanen[t] with the same name as that permanent" will be exiled (C.R. 608.2b). (Note, however, that it's not damage, by itself, that destroys [not: kills] creatures, but rather a state-based action that could do so [C.R. 120.5, 704.5g-h].)
Detention Sphere Ruling