Captain Alastair Cook will miss the second one-day international with Sri Lanka because of a groin injury.