Serena Williams has been forced to withdraw from the Miami Open due to a knee injury.