If you are running a SQL Server Express Edition, it has a different network protocol configuration than the other editions.
https://learn.microsoft.com/en-us/sql/database-engine/configure-windows/default-sql-server-network-protocol-configuration?view=sql-server-ver16#default-configuration
You usually have to enable the TCP protocol first and then restart the DB engine.. but (if) you have already worked through the SQLServerCentral post that enables those protocols.
So, maybe you check your configuration and maybe check your firewall... UDP 1434 is not the only port you need to open, you also have to open tcp/1433 (default port) => maybe change the dynamic port to a fixed port
Additionally to the post from Yufeishao (and based on his link):
SQL Server Express usually installs as "localhost\sqlexpress", so you have to insert the instanceName parameter into your connectionstring
jdbc:sqlserver://localhost;encrypt=true;**instanceName=sqlexpress**;integratedSecurity=true;<more properties as required>;