Failed to build the project

I am new to gradle and I am creating multiple projects but it gives me an error executing the build.

the project structure is as follows:

[http://imgfz.com/i/WcvLb3k.png]

and I also imported the packages to the files that need it, and if I run the bootRun task it runs correctly

[http://imgfz.com/i/ldQRh6D.png]

****************** build.gradle ****************

  plugins {
    id 'java'
    id 'org.springframework.boot' version '2.3.0.RELEASE'
    id 'io.spring.dependency-management' version '1.0.9.RELEASE'
}
  allprojects {
          repositories {
         mavenCentral()
    }
    apply plugin: 'java'
    apply plugin: 'org.springframework.boot'
    apply plugin: 'io.spring.dependency-management'
    bootJar {
    	mainClassName = 'com.pilot.Application'
	}

    dependencies {
        implementation 'org.springframework.boot:spring-boot-dependencies:2.3.0.RELEASE'
        implementation 'org.springframework.boot:spring-boot-starter-web'
        testImplementation 'org.springframework.boot:spring-boot-starter-test'

        components {
            withModule('org.springframework:spring-beans') {
                allVariants {
                    withDependencyConstraints {
                        // Need to patch constraints because snakeyaml is an optional dependency
                        it.findAll { it.name == 'snakeyaml' }.each { it.version { strictly '1.19' } }
                    }
                }
            }
        }
    }
}

	

dependencies {
		implementation project(':command:person')
}

****************** settings.gradle ****************

rootProject.name = 'pilot'

include ":shared:infrastructure"
include ":shared:domain"
include ":shared:application"

rootDir.eachDir { dir ->
  if ( dir.name.startsWith('command') || dir.name.startsWith('query')) {
  	dir.eachDir { subDir ->
      if ( !( subDir.name.startsWith('.') ) ) {
        include ":$dir.name:$subDir.name:infrastructure"
        include ":$dir.name:$subDir.name:domain"
        include ":$dir.name:$subDir.name:application"
      }
    }
  }
}

Thanks for your help.