R. Maurice Lamm, Becoming a Jew, p. 250 (link):
American Jews participate in celebrations such as Thanksgiving and the Fourth of July as do all Americans. They are national and religious holidays...And R. Michael J. Broyde, quoting R. Yehuda Henkin (link):
The same is true for the Fourth of July. Every country has a celebration of national independence. And, indeed, Jews are mandated by the Halakhah to follow the law of the land except when it conflicts with the religious or moral laws of the Torah. While the Halakhah does not require Jews to celebrate Independence Day, it certainly does not preclude such celebration. We should view this day as an opportunity for expressing Jewish appreciation for democracy and capitalism and for a system of government that has assured us peace and tranquility and the freedom to practice our religion.
However, if the reason for the celebration is primarily secular it is permissible to celebrate, such as the coronation of the king, the Fourth of July in America or Thanksgiving. For this it makes no difference that some Gentiles celebrate these holidays in churches.