This is a different problem, because xlsx is actualy avalilable for R version 3.5.2 on windows, are you using a different internet connection now? if you are at work there is a chance that your internet connection is behind a proxy server or a firewall.
install.packages('xlsx', type = 'source', INSTALL_opts='--no-multiarch')
trying URL 'https://cran.rstudio.com/src/contrib/xlsx_0.6.1.tar.gz'
Content type 'application/x-gzip' length 315441 bytes (308 KB)
downloaded 308 KB
* installing *source* package 'xlsx' ...
** package 'xlsx' successfully unpacked and MD5 sums checked
** R
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
converting help for package 'xlsx'
finding HTML links ... done
Alignment html
Border html
Cell html
CellBlock html
CellProtection html
CellStyle-plus html
CellStyle html
Comment html
DataFormat html
Fill html
Font html
NamedRanges html
OtherEffects html
POI_constants html
Picture html
PrintSetup html
Row html
Sheet html
Workbook html
addDataFrame html
addHyperlink html
autoRefresh html
read.xlsx html
readColumns html
readRows html
write.xlsx html
Rd warning: C:/Users/andre/AppData/Local/Temp/RtmpygpQ2e/R.INSTALL471848d933de/xlsx/man/write.xlsx.Rd:38: file link 'write.csv' in package 'utils' does not exist and so has been treated as a topic
xlsx-package html
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (xlsx)
In R CMD INSTALL
The downloaded source packages are in
‘C:\Users\andre\AppData\Local\Temp\RtmpaU8czi\downloaded_packages’