Woodley's involvement had been rumored since mid-February when tweets by Green connected both Woodley and Josh Boone, the film's director, the Hollywood Reporter said.
The film's story revolves around Hazel Lancaster, a teenage girl with terminal cancer who falls for a boy in her support group. The two form a bond as they deal with their illnesses.
"During our exhaustive search to find Hazel Grace Lancaster, I saw some stunning auditions by today's finest young actresses. Over 250 girls read for the part, but it wasn't until Shailene stepped in front of the camera that I truly saw Hazel for the first time. It was like lightning striking," said Boone in a statement.
She also has a small role in 'The Amazing Spider-Man 2'.