Take a look at the sentence again:
Josh neglected not only
to thank Solita,
but he
also gave a sip
of orange soda to Reva, Solita's rival.
When you use not only ... but also, you must have two equal grammatical items. After not only, notice that you have an infinitive phrase, to thank Solita. But after but also, you have a main clause, he gave a sip of orange soda to Reva. The structure is not parallel.
To fix the sentence, you can write Not only did Josh neglect to thank Solita, making the first half a main clause.