The united states signed on to the ICJ in 1945.
Some treaties have optional parts where you can defer disputes to the icj. The united states is a party to some of those but not all of them. But that is really a separate thing from the ICJ.
The ICC is very different from ICJ. USA has been pretty hostile to the icc since the get-go.