"The Fault in Our Stars" is based on the bestselling novel by John Green about two teenagers who meet in a cancer support group and fall in love.
Elgort, who co-stars in Sony's remake of "Carrie," will soon begin negotiating for the role of Augustus "Gus" Waters.
“I am by nature a cautious pessimist, but I’ll just say it: Now that we have Shailene and Ansel, I am completely, unreservedly psyched about this movie,” the author told EW.
Boone was equally enthused, praising the actor's "humor, sensitivity, honesty and confidence."
Elgort is represented by CAA, Brookside Artist Management and attorney Kevin Yorn.
CAA, Brookside and Fox did not immediately respond to TheWrap's request for comment.
Entertainment Weekly broke the news of Elgort's casting.