Use Duration.ofSeconds(30) instead of 30
new WebDriverWait(myChromeDriver, Duration.ofSeconds(30)).until((ExpectedCondition) wd -> ((JavascriptExecutor) wd).executeScript("return document.readyState").equals("complete"));